path prefix portainer

This commit is contained in:
Yax 2020-07-06 18:46:57 +02:00
parent 7ba194d6df
commit b32820fa4d
2 changed files with 7 additions and 1 deletions

View file

@ -3,6 +3,8 @@ GANDIV5_API_KEY=xxxxxxxxxxxxxxxxx
LETSENCRYPT_EMAIL=root@localhost.localdomain
# sites
DOMAIN=localhost.localdomain
HOST_WWW=www
PATH_PORTAINER=/console
HOST_TRAEFIK=traefik
HOST_GLANCES=glances
HOST_PORTAINER=portainer

View file

@ -15,10 +15,14 @@ services:
- 9000
labels:
- traefik.enable=true
- traefik.http.routers.portainer.rule=Host(`${HOST_PORTAINER}.${DOMAIN}`)
- traefik.http.routers.portainer.rule=Host(`${HOST_WWW}.${DOMAIN}`) && PathPrefix(`${PATH_PORTAINER}`)"
- traefik.http.routers.portainer.entrypoints=websecure
- traefik.http.routers.portainer.tls=true
- traefik.http.services.portainer.loadbalancer.server.port=9000
- traefik.http.routers.portainer.middlewares=portainerRedir,portainerPStrip
- traefik.http.middlewares.portainerPStrip.stripprefix.prefixes=${PATH_PORTAINER}
- traefik.http.middlewares.portainerRedir.redirectregex.regex=^(.*)${PATH_PORTAINER}$$
- traefik.http.middlewares.portainerRedir.redirectregex.replacement=$${1}${PATH_PORTAINER}/
volumes:
portainer_data: