From b7d4fdfb8e3873ee73fa38708ebc4dda26a27e11 Mon Sep 17 00:00:00 2001 From: Philip Cheung Date: Tue, 8 Oct 2024 16:02:08 +0800 Subject: [PATCH] test --- docker-compose.yml | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1426817..dcddf77 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,26 +17,15 @@ services: - traefik.enable=true - traefik.docker.network=traefik-public - traefik.constraint-label=traefik-public + - traefik.http.routers.${STACK_NAME?Variable not set}-app-http.rule=Host(`${DOMAIN?Variable not set}`) + - traefik.http.routers.${STACK_NAME?Variable not set}-app-http.entrypoints=http + - traefik.http.routers.${STACK_NAME?Variable not set}-app-http.middlewares=https-redirect + - traefik.http.routers.${STACK_NAME?Variable not set}-app-https.rule=Host(`${DOMAIN?Variable not set}`) + - traefik.http.routers.${STACK_NAME?Variable not set}-app-https.entrypoints=https + - traefik.http.routers.${STACK_NAME?Variable not set}-app-https.tls=true + - traefik.http.routers.${STACK_NAME?Variable not set}-app-https.tls.certresolver=le + - traefik.http.services.${STACK_NAME?Variable not set}-app.loadbalancer.server.port=3000 - # - traefik.http-allAndOne.loadbalancer.server.port=80 - - # - traefik.http.routers.allAndOne-http.rule=Host(`${DOMAIN?Variable not set}`) || Host(`www.${DOMAIN?Variable not set}`) - # - traefik.http.routers.allAndOne-http.entrypoints=http - - # - traefik.http.routers.allAndOne-https.rule=Host(`${DOMAIN?Variable not set}`) || Host(`www.${DOMAIN?Variable not set}`) - # - traefik.http.routers.allAndOne-https.entrypoints=https - # - traefik.http.routers.allAndOne-https.tls=true - # - traefik.http.routers.allAndOne-https.tls.certresolver=le - - - traefik.basic.allinone.rule=Host(`${DOMAIN?Variable not set}`) || Host(`www.${DOMAIN?Variable not set}`) - - "traefik.basic.port=80" - - "traefik.basic.protocol=http" - - traefik.http.routers.allinone-https.middlewares=www-redirect - - traefik.http.routers.allinone-http.middlewares=https-redirect,www-redirect - - # Enable www redirection for HTTP and HTTPS - # - traefik.http.routers.allAndOne-https.middlewares=www-redirect - # - traefik.http.routers.allAndOne-http.middlewares=https-redirect,www-redirect networks: - traefik-public - default