path prefix portainer
This commit is contained in:
parent
7ba194d6df
commit
b32820fa4d
2 changed files with 7 additions and 1 deletions
|
@ -3,6 +3,8 @@ GANDIV5_API_KEY=xxxxxxxxxxxxxxxxx
|
||||||
LETSENCRYPT_EMAIL=root@localhost.localdomain
|
LETSENCRYPT_EMAIL=root@localhost.localdomain
|
||||||
# sites
|
# sites
|
||||||
DOMAIN=localhost.localdomain
|
DOMAIN=localhost.localdomain
|
||||||
|
HOST_WWW=www
|
||||||
|
PATH_PORTAINER=/console
|
||||||
HOST_TRAEFIK=traefik
|
HOST_TRAEFIK=traefik
|
||||||
HOST_GLANCES=glances
|
HOST_GLANCES=glances
|
||||||
HOST_PORTAINER=portainer
|
HOST_PORTAINER=portainer
|
||||||
|
|
|
@ -15,10 +15,14 @@ services:
|
||||||
- 9000
|
- 9000
|
||||||
labels:
|
labels:
|
||||||
- traefik.enable=true
|
- 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.entrypoints=websecure
|
||||||
- traefik.http.routers.portainer.tls=true
|
- traefik.http.routers.portainer.tls=true
|
||||||
- traefik.http.services.portainer.loadbalancer.server.port=9000
|
- 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:
|
volumes:
|
||||||
portainer_data:
|
portainer_data:
|
||||||
|
|
Loading…
Add table
Reference in a new issue