From 096d83445a3c017514d7db2973927eedf621e5e8 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Thu, 1 Oct 2020 20:33:37 +0200 Subject: [PATCH] Enable EXTRA_DOMAINS redirects See compose-stacks/organising#15 --- compose.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/compose.yml b/compose.yml index b2ff7af..6cf30a2 100644 --- a/compose.yml +++ b/compose.yml @@ -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: