Enable EXTRA_DOMAINS redirects

See compose-stacks/organising#15
This commit is contained in:
3wc 2020-10-01 20:33:37 +02:00
parent 1572a1fdde
commit 096d83445a
1 changed files with 11 additions and 12 deletions

View File

@ -32,18 +32,16 @@ services:
constraints:
- node.role == manager
labels:
- traefik.enable=true
- traefik.docker.network=proxy
#- traefik.constraint-label=proxy
- traefik.http.routers.${STACK_NAME}-http.rule=Host(`${DOMAIN?Variable not set}`)
- traefik.http.routers.${STACK_NAME}-http.entrypoints=web
# Add https-redirect middleware from https://dockerswarm.rocks/traefik/
#- traefik.http.routers.${STACK_NAME}-http.middlewares=https-redirect
- traefik.http.routers.${STACK_NAME}-https.rule=Host(`${DOMAIN?Variable not set}`)
- traefik.http.routers.${STACK_NAME}-https.entrypoints=web-secure
- traefik.http.routers.${STACK_NAME}-https.tls=true
- traefik.http.routers.${STACK_NAME}-https.tls.certresolver=${LETS_ENCRYPT_ENV}
- traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8080
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls=true"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8080"
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
db:
image: couchdb:2.3.1
@ -62,6 +60,7 @@ services:
#placement:
# constraints:
# - node.labels.swarmpit.db-data == true
influxdb:
image: influxdb:1.8
volumes: