add host variables

This commit is contained in:
Yax 2020-06-28 11:43:06 +02:00
parent c961d9dfc7
commit ad868b1c5a
3 changed files with 6 additions and 5 deletions

View file

@ -1,2 +1,4 @@
DOMAIN=localhost
TZ=Europe/Paris
DOMAIN=localhost.localdomain
HOST_GLANCES=glances
HOST_PORTAINER=portainer
TZ=Europe/Paris

View file

@ -17,7 +17,7 @@ services:
- 61208
labels:
- traefik.enable=true
- traefik.http.routers.glances.rule=Host(`glances.${DOMAIN}`)
- traefik.http.routers.glances.rule=Host(`${HOST_GLANCES}.${DOMAIN}`)
- traefik.http.routers.glances.entrypoints=web
- traefik.http.services.glances.loadbalancer.server.port=61208

View file

@ -15,8 +15,7 @@ services:
- 9000
labels:
- traefik.enable=true
- traefik.http.routers.portainer.rule=Host(`glances.${DOMAIN}`) && PathPrefix(`/portainer`)
- traefik.http.middlewares.test-stripprefix.stripprefix.prefixes=/portainer,/portainer/
- traefik.http.routers.portainer.rule=Host(`${HOST_PORTAINER}.${DOMAIN}`)
- traefik.http.routers.portainer.entrypoints=web
- traefik.http.services.portainer.loadbalancer.server.port=9000