fix(infra): engine-portable portal nginx resolver (closes #96) #97

Merged
not merged 2 commits from fix/portal-nginx-resolver into main 2026-07-16 14:23:41 +00:00
Contributor

What & why

Closes #96. The portal nginx configs hardcode resolver 127.0.0.11 (Docker's embedded DNS) for their variable proxy_pass to the BFF, so on rootless podman (network-specific aardvark DNS) every proxied call 502'd — the portals loaded and login worked, but no in-app data flowed.

Add a shared /docker-entrypoint.d hook (apps/portal-nginx-resolver.sh, wired into all three portal Dockerfiles) that rewrites the resolver from the container's own /etc/resolv.conf at startup: a no-op on Docker (nameserver is 127.0.0.11) and correct on podman (rewrites to e.g. 10.89.0.1). nginx.conf is unchanged (the hardcoded value is the substitution anchor).

How verified

Built the behandel image and ran it on the compose network under podman: the hook rewrote the config to resolver 10.89.0.1, and GET /behandel/werkbak proxied to the BFF returning 401 (auth), not 502. On Docker the nameserver is 127.0.0.11 so the substitution is a no-op and CI/e2e behaviour is unchanged.

## What & why Closes #96. The portal nginx configs hardcode `resolver 127.0.0.11` (Docker's embedded DNS) for their variable `proxy_pass` to the BFF, so on rootless **podman** (network-specific aardvark DNS) every proxied call 502'd — the portals loaded and login worked, but no in-app data flowed. Add a shared `/docker-entrypoint.d` hook (`apps/portal-nginx-resolver.sh`, wired into all three portal Dockerfiles) that rewrites the resolver from the container's own `/etc/resolv.conf` at startup: a **no-op on Docker** (nameserver *is* 127.0.0.11) and **correct on podman** (rewrites to e.g. 10.89.0.1). nginx.conf is unchanged (the hardcoded value is the substitution anchor). ## How verified Built the behandel image and ran it on the compose network under podman: the hook rewrote the config to `resolver 10.89.0.1`, and `GET /behandel/werkbak` proxied to the BFF returning **401** (auth), not 502. On Docker the nameserver is 127.0.0.11 so the substitution is a no-op and CI/e2e behaviour is unchanged.
not added 1 commit 2026-07-16 13:43:38 +00:00
fix(infra): portal nginx resolver works on podman too, not just Docker
Some checks failed
CI / lint (pull_request) Successful in 1m18s
CI / unit (pull_request) Has been cancelled
CI / frontend (pull_request) Has been cancelled
CI / mutation (pull_request) Has been cancelled
CI / verify-stack (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
5de2e9367d
The portal reverse proxies hardcoded Docker's embedded DNS (resolver 127.0.0.11); on rootless

podman the DNS is network-specific (aardvark), so every proxied BFF call 502'd. Add an

/docker-entrypoint.d hook that rewrites the resolver from the container's /etc/resolv.conf at

startup — a no-op on Docker (nameserver IS 127.0.0.11), correct on podman. Verified: the built

image rewrites to 10.89.0.1 and /behandel/werkbak proxies to the BFF (401, not 502).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
not added the type:bugarea:infra labels 2026-07-16 13:43:39 +00:00
not added 1 commit 2026-07-16 13:56:58 +00:00
Merge branch 'main' into fix/portal-nginx-resolver
All checks were successful
CI / lint (pull_request) Successful in 1m21s
CI / build (pull_request) Successful in 1m23s
CI / unit (pull_request) Successful in 1m24s
CI / frontend (pull_request) Successful in 3m12s
CI / mutation (pull_request) Successful in 5m48s
CI / verify-stack (pull_request) Successful in 12m50s
417f6abfa8
not merged commit 8a537edd6c into main 2026-07-16 14:23:41 +00:00
Sign in to join this conversation.