diff --git a/docs/compose/compose.multi-bench-ssl.yaml b/docs/compose/compose.multi-bench-ssl.yaml index 73e6becd..158d22bd 100644 --- a/docs/compose/compose.multi-bench-ssl.yaml +++ b/docs/compose/compose.multi-bench-ssl.yaml @@ -1,5 +1,14 @@ services: frontend: labels: - - traefik.http.routers.${ROUTER}.entrypoints=http,https - - traefik.http.routers.${ROUTER}.tls.certresolver=le + # ${ROUTER}-http to use the middleware to redirect to https + - traefik.http.routers.${ROUTER}-http.middlewares=https-redirect + # ${ROUTER}-https the actual router using HTTPS + # Uses the environment variable SITES + - traefik.http.routers.${ROUTER}-https.rule=Host(${SITES?SITES not set}) + - traefik.http.routers.${ROUTER}-https.entrypoints=https + - traefik.http.routers.${ROUTER}-https.tls=true + # Use the service ${ROUTER} with the frontend + - traefik.http.routers.${ROUTER}-https.service=${ROUTER} + # Use the "le" (Let's Encrypt) resolver created below + - traefik.http.routers.${ROUTER}-https.tls.certresolver=le diff --git a/docs/compose/compose.multi-bench.yaml b/docs/compose/compose.multi-bench.yaml index ee2e17ee..17145c65 100644 --- a/docs/compose/compose.multi-bench.yaml +++ b/docs/compose/compose.multi-bench.yaml @@ -8,9 +8,9 @@ services: - traefik.enable=true - traefik.docker.network=traefik-public - traefik.http.services.${ROUTER?ROUTER not set}.loadbalancer.server.port=8080 - - traefik.http.routers.${ROUTER}.service=${ROUTER} - - traefik.http.routers.${ROUTER}.entrypoints=http - - traefik.http.routers.${ROUTER}.rule=Host(${SITES?SITES not set}) + - traefik.http.routers.${ROUTER}-http.service=${ROUTER} + - traefik.http.routers.${ROUTER}-http.entrypoints=http + - traefik.http.routers.${ROUTER}-http.rule=Host(${SITES?SITES not set}) configurator: networks: - mariadb-network