From aa569696fa2546b6224ee44100cdd3f9a364d8cf Mon Sep 17 00:00:00 2001 From: Peter Gonda Date: Wed, 2 Sep 2026 10:46:57 +0200 Subject: [PATCH] fix(traefik): enable file provider + resolve panel host for domain routing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting a domain on the panel (or any file-based dynamic route) had no effect: the Nomad-variant Traefik config only declared the consulCatalog provider, so the dynamic config files nomploy writes to /etc/nomploy/traefik/dynamic (e.g. the panel's own domain router) were never loaded. Also the panel route targets http://nomploy:3000 (the app container name), which doesn't resolve when Traefik runs on the host network. - Add a Traefik 'file' provider (directory watch) in both install.sh and initializeTraefikNomad (nomad-setup.ts). - Add '--add-host nomploy:127.0.0.1' to the Traefik container so the panel route resolves to the host-networked app. Verified live: after this, http→https redirect works and the panel serves on its domain with a valid Let's Encrypt certificate. Co-Authored-By: Claude Opus 4.8 --- install.sh | 6 ++++++ packages/server/src/setup/nomad-setup.ts | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/install.sh b/install.sh index dd9cbe28b..f08e7778f 100755 --- a/install.sh +++ b/install.sh @@ -206,6 +206,11 @@ providers: address: "http://127.0.0.1:8500" exposedByDefault: false prefix: traefik + # File provider: nomploy writes dynamic routes here (e.g. the panel's own + # domain). Without this, setting a domain in the UI has no effect. + file: + directory: "/etc/nomploy/traefik/dynamic" + watch: true api: insecure: true @@ -228,6 +233,7 @@ fi echo "==> Starting Traefik" run_container nomploy-traefik \ --network host \ + --add-host nomploy:127.0.0.1 \ -v "$TRAEFIK_DIR/traefik.yml:/etc/traefik/traefik.yml:ro" \ -v "$TRAEFIK_DIR/acme.json:/etc/traefik/acme.json" \ -v "$TRAEFIK_DIR/dynamic:/etc/nomploy/traefik/dynamic" \ diff --git a/packages/server/src/setup/nomad-setup.ts b/packages/server/src/setup/nomad-setup.ts index d656c77ee..13c42f85a 100644 --- a/packages/server/src/setup/nomad-setup.ts +++ b/packages/server/src/setup/nomad-setup.ts @@ -157,6 +157,9 @@ providers: address: "${TRAEFIK_CONSUL_ADDRESS}" exposedByDefault: false prefix: traefik + file: + directory: "/etc/nomploy/traefik/dynamic" + watch: true api: insecure: true @@ -192,6 +195,7 @@ certificatesResolvers: await execAsync(`docker run -d --name ${name} \ ${networkFlag} \ + --add-host nomploy:127.0.0.1 \ -v ${configPath}:/etc/traefik/traefik.yml:ro \ -v ${acmePath}:/etc/traefik/acme.json \ -v ${DYNAMIC_TRAEFIK_PATH}:/etc/nomploy/traefik/dynamic \