From 61896978221a49de539e90c36c8e5930926cd719 Mon Sep 17 00:00:00 2001 From: Teck Meng Date: Thu, 5 Sep 2024 22:59:40 +0800 Subject: [PATCH] refactor: Update domain configuration in .env.example and local_core.yml --- .env.example | 1 + swarm/local_core.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index c721536..bb68f85 100644 --- a/.env.example +++ b/.env.example @@ -7,6 +7,7 @@ TZ="Asia/Singapore" ## dashboard configs HOST="localhost" # TLD="lol" +# LOCALDOMAIN="$(hostname).${TLD}" # DOMAIN="$(hostname).${TLD}" # DOMAINNAME="$(hostname).${TLD}" HOSTNAME="node00" diff --git a/swarm/local_core.yml b/swarm/local_core.yml index 5680488..e7ce6e6 100644 --- a/swarm/local_core.yml +++ b/swarm/local_core.yml @@ -75,7 +75,7 @@ services: - treafik.http.middlewares.neo4j_strip.stripprefix.prefixes=/neo4j # traefik-https the actual router using HTTPS - traefik.http.routers.traefik-public-https.entrypoints=https - - traefik.http.routers.traefik-public-https.rule=Host(`dashboard.${SLD}.lol`) + - traefik.http.routers.traefik-public-https.rule=Host(`dashboard.${DOMAIN}`) # Use the "le" (Let's Encrypt) resolver created below - traefik.http.routers.traefik-public-https.tls.certresolver=le # Enable HTTP Basic auth, using the middleware created above @@ -84,7 +84,7 @@ services: - 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.${SLD}.local`) + - traefik.http.routers.traefik-public-local-https.rule=HostRegexp(`dashboard.${LOCALDOMAIN}`) - 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