Use MacVLAN and obtain domain automatically

This commit is contained in:
Colin Hebert
2023-01-03 19:45:45 +01:00
parent 93d594dd02
commit 98aa775ff7
4 changed files with 30 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ providers:
endpoint: tcp://docker:2375
exposedByDefault: false
network: traefik
defaultRule: Host(`{{ index .Labels "com.docker.compose.service" }}.dev.dedicated.contact`)
defaultRule: Host(`{{ index .Labels "com.docker.compose.service" }}.{{ env `NAS_COMPOSE_DOMAIN` }}`)
file:
directory: /etc/traefik/dynamic/

View File

@@ -1,7 +1,7 @@
http:
routers:
traefik:
rule: Host(`traefik.dev.dedicated.contact`)
rule: Host(`traefik.{{ env `NAS_COMPOSE_DOMAIN` }}`)
service: api@internal
middlewares:
- traefik-auth