From 975d8e01a4375a69e37db88e429afeef9b5b2f02 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Tue, 18 Oct 2022 17:06:11 -0400 Subject: [PATCH] Use $STACK_NAME for default router name.. ..instead of hard-coded `traefik` --- compose.headless.yml | 4 ++-- compose.yml | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/compose.headless.yml b/compose.headless.yml index 0ccb9bc..7f8530a 100644 --- a/compose.headless.yml +++ b/compose.headless.yml @@ -10,5 +10,5 @@ services: labels: - "traefik.enable=true" - "traefik.http.services.traefik.loadbalancer.server.port=web" - - "traefik.http.routers.traefik.entrypoints=web-secure" - - "traefik.http.routers.traefik.service=api@internal" + - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" + - "traefik.http.routers.${STACK_NAME}.service=api@internal" diff --git a/compose.yml b/compose.yml index 25d7f71..dcbb1c7 100644 --- a/compose.yml +++ b/compose.yml @@ -40,13 +40,13 @@ services: order: start-first labels: - "traefik.enable=true" - - "traefik.http.services.traefik.loadbalancer.server.port=web" - - "traefik.http.routers.traefik.rule=Host(`${DOMAIN}`)" - - "traefik.http.routers.traefik.entrypoints=web-secure" - - "traefik.http.routers.traefik.tls.certresolver=${LETS_ENCRYPT_ENV}" - - "traefik.http.routers.traefik.tls.options=default@file" - - "traefik.http.routers.traefik.service=api@internal" - - "traefik.http.routers.traefik.middlewares=security@file" + - "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=web" + - "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)" + - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure" + - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}" + - "traefik.http.routers.${STACK_NAME}.tls.options=default@file" + - "traefik.http.routers.${STACK_NAME}.service=api@internal" + - "traefik.http.routers.${STACK_NAME}.middlewares=security@file" - "coop-cloud.${STACK_NAME}.version=1.1.1+v2.8.1" networks: