From 700f1fafd1faa333b5a1cc831e313d2b5eb1b7ec Mon Sep 17 00:00:00 2001 From: tyt11123 Date: Sun, 10 Apr 2022 06:30:00 +0800 Subject: [PATCH] Update multi-bench yaml (#767) --- docs/compose/compose.multi-bench-ssl.yaml | 13 +++++++++++-- docs/compose/compose.multi-bench.yaml | 6 +++--- 2 files changed, 14 insertions(+), 5 deletions(-) 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