11# For the hostnames to work an entry in /etc/hosts is needed:
2- # 127.0.0.1 orthos2.orthos2.test cobbler.orthos2.test netbox.orthos2.test
2+ # 127.0.0.1 authentik.orthos2.test orthos2.orthos2.test cobbler.orthos2.test netbox.orthos2.test
33services :
44 proxy :
55 image : traefik:v3.6
@@ -11,13 +11,23 @@ services:
1111 - --providers.docker.exposedbydefault=false
1212 - --entrypoints.web.address=:80
1313 - --entrypoints.websecure.address=:443
14+ - --providers.file.directory=/etc/traefik/dynamic
15+ - --providers.file.watch=true
1416 ports :
1517 - " 80:80"
1618 - " 443:443"
1719 - " 8080:8080"
1820 volumes :
19- - /var/run/docker.sock:/var/run/docker.sock:ro,z
21+ - /var/run/docker.sock:/var/run/docker.sock:ro
22+ - ./traefik_certs:/certs:ro
23+ - ./traefik_certs/authentik.orthos2.test_certificate.crt:/certs/authentik.orthos2.test_certificate.crt:ro
24+ - ./traefik_certs/authentik.orthos2.test_private_key.key:/certs/authentik.orthos2.test_private_key.key:ro
25+ - ./traefik_certs/dynamic_conf.yaml:/etc/traefik/dynamic/certs.yaml:ro
2026 restart : always
27+ networks :
28+ orthos :
29+ aliases :
30+ - authentik.orthos2.test
2131 security_opt :
2232 - label:disable
2333 orthos2 :
@@ -31,6 +41,8 @@ services:
3141 - NET_RAW
3242 volumes :
3343 - ./:/code:z
44+ networks :
45+ - orthos
3446 depends_on :
3547 orthos2_database :
3648 condition : service_healthy
@@ -43,10 +55,8 @@ services:
4355 retries : 5
4456 labels :
4557 - " traefik.enable=true"
46- - " traefik.http.routers.orthos2-http.rule=Host(`orthos2.orthos2.test`)"
47- - " traefik.http.routers.orthos2-http.entrypoints=web"
48- - " traefik.http.routers.orthos2-http.middlewares=orthos2-https"
49- - " traefik.http.middlewares.orthos2-https.redirectScheme.scheme=https"
58+ - " traefik.http.routers.orthos2.rule=Host(`orthos2.orthos2.test`)"
59+ - " traefik.http.routers.orthos2.entrypoints=web"
5060 - " traefik.http.routers.orthos2-https.rule=Host(`orthos2.orthos2.test`)"
5161 - " traefik.http.routers.orthos2-https.entrypoints=websecure"
5262 - " traefik.http.routers.orthos2-https.tls=true"
@@ -63,6 +73,8 @@ services:
6373 - NET_RAW
6474 volumes :
6575 - ./:/code
76+ networks :
77+ - orthos
6678 depends_on :
6779 orthos2_database :
6880 condition : service_healthy
@@ -74,6 +86,8 @@ services:
7486 hostname : database.orthos2.test
7587 env_file :
7688 - " docker/orthos/db.env"
89+ networks :
90+ - orthos
7791 healthcheck :
7892 test :
7993 [
@@ -90,21 +104,25 @@ services:
90104 dockerfile : cobbler.dockerfile
91105 labels :
92106 - " traefik.enable=true"
93- - " traefik.http.routers.cobbler-http .rule=Host(`cobbler.orthos2.test`)"
94- - " traefik.http.routers.cobbler-http .entrypoints=web"
107+ - " traefik.http.routers.cobbler.rule=Host(`cobbler.orthos2.test`)"
108+ - " traefik.http.routers.cobbler.entrypoints=web"
95109 - " traefik.http.routers.cobbler-https.rule=Host(`cobbler.orthos2.test`)"
96110 - " traefik.http.routers.cobbler-https.entrypoints=websecure"
97111 - " traefik.http.routers.cobbler-https.tls=true"
98112 - " traefik.http.services.cobbler.loadbalancer.server.port=80"
99113 serial_console :
100114 hostname : sconsole.orthos2.test
115+ networks :
116+ - orthos
101117 build :
102118 context : docker/serial-console
103119 dockerfile : serial-console.dockerfile
104120 # ports:
105121 # - 22:22
106122 machine_bmc :
107123 hostname : bmc.orthos2.test
124+ networks :
125+ - orthos
108126 build :
109127 context : docker/bmc
110128 dockerfile : bmc.dockerfile
@@ -113,6 +131,8 @@ services:
113131 # Netbox part below taken and adjusted from https://github.com/netbox-community/netbox-docker
114132 netbox : &netbox
115133 image : ${IMAGE-docker.io/netboxcommunity/netbox:latest}
134+ networks :
135+ - orthos
116136 depends_on :
117137 postgres :
118138 condition : service_healthy
@@ -135,6 +155,8 @@ services:
135155 - /opt/netbox/venv/bin/python
136156 - /opt/netbox/netbox/manage.py
137157 - rqworker
158+ networks :
159+ - orthos
138160 depends_on :
139161 netbox :
140162 condition : service_healthy
@@ -147,6 +169,8 @@ services:
147169 << : *netbox
148170 command :
149171 - /opt/netbox/housekeeping.sh
172+ networks :
173+ - orthos
150174 depends_on :
151175 netbox :
152176 condition : service_healthy
@@ -159,6 +183,8 @@ services:
159183 postgres :
160184 image : docker.io/postgres:17-alpine
161185 env_file : docker/netbox/postgres.env
186+ networks :
187+ - orthos
162188 healthcheck :
163189 test :
164190 [
@@ -176,6 +202,8 @@ services:
176202 - -c # this is to evaluate the $REDIS_PASSWORD from the env
177203 - valkey-server --save "" --appendonly no --requirepass $$REDIS_PASSWORD # # $$ because of docker-compose
178204 env_file : docker/netbox/redis.env
205+ networks :
206+ - orthos
179207 healthcheck :
180208 test : ' [ $$(valkey-cli --pass "$${REDIS_PASSWORD}" ping) = '' PONG'' ]'
181209 start_period : 5s
@@ -186,3 +214,8 @@ services:
186214 << : *redis
187215 env_file : docker/netbox/redis-cache.env
188216
217+ volumes :
218+ database :
219+ driver : local
220+ networks :
221+ orthos :
0 commit comments