1.3 KiB
1.3 KiB
0067 No nginx per app
Status: Accepted · Area: architecture · Date: 2026-10-16 · Decided by: user
Context
Each app had its own apps/<app>/nginx.conf and <app>-nginx container in front of its release, so tools/deploy.sh could swap releases with no refused request. The user removed it.
Decision
- No
nginx.confin this repo. Each app's container publishesHTTP_PORTon the host itself (3000 inside the container). tools/deploy.sh <app>checks the new release's/healthzin a container with no published port, then stops the old release and starts the new one onHTTP_PORT. A failed check leaves the old release serving; a failed start brings the old one back.- The edge that routes phones to bull and desktops to bear (0001) points at each app's
HTTP_PORT.
Alternatives
- One nginx per app, reloaded onto the new release: no refused requests during a swap, but one more container and config per app. Removed by the user.
Consequences
- Each deploy refuses connections for the old release's shutdown (in-flight requests finish, 30 s at most) plus the new one's start, about half a second when idle.
/healthzanswers onHTTP_PORT; the edge should hide it from visitors.- The edge must set
Vary: User-Agent(0001) and must not buffer streamed pages (the apps sendX-Accel-Buffering: no).