From 699aa5757ffe81fd9ff255c6f7015bf002769eac Mon Sep 17 00:00:00 2001 From: Teck Meng Date: Thu, 5 Sep 2024 21:51:52 +0800 Subject: [PATCH] refactor: Update traefik-public and traefik-public-local HTTPS routers in Swarm core.yml and local_core.yml --- swarm/local_core.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/swarm/local_core.yml b/swarm/local_core.yml index aaa7601..bfc7de5 100644 --- a/swarm/local_core.yml +++ b/swarm/local_core.yml @@ -74,15 +74,22 @@ services: - traefik.http.middlewares.xbot.headers.referrerPolicy="no-referrer" - treafik.http.middlewares.neo4j_strip.stripprefix.prefixes=/neo4j # traefik-https the actual router using HTTPS - - traefik.http.routers.traefik-public-https.rule=Host(`dashboard.${DOMAIN?Variable not set}`) - traefik.http.routers.traefik-public-https.entrypoints=https - - traefik.http.routers.traefik-public-https.tls=true + - traefik.http.routers.traefik-public-https.rule=HostRegexp(`dashboard\.(.*)\.lol`) # Use the "le" (Let's Encrypt) resolver created below - # - traefik.http.routers.traefik-public-https.tls.certresolver=le + - traefik.http.routers.traefik-public-https.tls.certresolver=le # Enable HTTP Basic auth, using the middleware created above - traefik.http.routers.traefik-public-https.middlewares=admin-auth # Use the special Traefik service api@internal with the web UI/Dashboard - traefik.http.routers.traefik-public-https.service=api@internal + # Local service router + - traefik.http.routers.traefik-public-local-https.entrypoints=https + - traefik.http.routers.traefik-public-local-https.rule=HostRegexp(`dashboard\.(.*)\.local`) + - traefik.http.routers.traefik-public-local-https.tls=true + # Enable HTTP Basic auth, using the middleware created above + - traefik.http.routers.traefik-public-local-https.middlewares=admin-auth + # Use the special Traefik service api@internal with the web UI/Dashboard + - traefik.http.routers.traefik-public-local-https.service=api@internal # Define the port inside of the Docker service to use - traefik.http.services.traefik-public.loadbalancer.server.port=8080 volumes: