fix(dev): resolve dev-web SSO Traefik IP dynamically (no hardcoded pin) #468
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/dev-web-traefik-ip"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Make the
just dev-webBunyip SSO routing robust to Traefik IP drift. Dev-only tooling - no app/runtime code changes.Why
The chat container reaches the dev Bunyip OP server-to-server for OIDC discovery/JWKS at startup (LC-22 makes this mandatory, so a failure = boot refusal + restart loop). Because the public DNS path 404s for discovery, the compose pinned the issuer host to the dev Traefik on
network-traefik-publicviaextra_hosts- but with a hardcoded IP (10.200.0.4). When that network is recreated Traefik gets a new IP, the pin goes stale, and the chat server can't fetch discovery and won't start. (Hit exactly this; the file's own comment admitted it needed manual refresh.)How
dev/traefik-ip: scansnetwork-traefik-publicfor the attached Traefik container and prints its current IPv4 (no hardcoded container name; prints nothing on failure).just dev-webinjectsTRAEFIK_PUBLIC_IP="$(./dev/traefik-ip)".compose.dev-web.ymlextra_hostsnow uses${TRAEFIK_PUBLIC_IP:-10.200.0.3}- dynamic at everyup, with a default so a baredocker compose upoutside the recipe still works.The pin still targets Traefik (TLS terminates there); only the IP discovery changed. The issuer string + ID-token
issvalidation are unaffected.Verify
./dev/traefik-ipprints the live Traefik IP (10.200.0.3here).docker compose configresolvesextra_hoststolong-bunyip-api.a8n.run=10.200.0.3both with the var set and via the fallback.Up (healthy),listening addr=0.0.0.0:8080, no SSO error).Only
dev-webcarries this pin (the saas dev compose does not), so it is the only recipe touched.The chat container pins the Bunyip SSO issuer host to the dev Traefik on network-traefik-public so server-to-server discovery reaches it. That IP was hardcoded (10.200.0.4) and drifted when the network was recreated, leaving the server unable to fetch discovery and refusing to start (restart loop). Now `just dev-web` injects TRAEFIK_PUBLIC_IP from ./dev/traefik-ip and extra_hosts uses ${TRAEFIK_PUBLIC_IP:-...} with a default for a bare compose up. No app/runtime change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>