refactor: Update traefik-public and traefik-public-local HTTPS routers in Swarm core.yml and local_core.yml

This commit is contained in:
2024-09-05 21:51:52 +08:00
parent 75bb1e4675
commit 699aa5757f
+10 -3
View File
@@ -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: