nginx -t resolves upstream hostnames — if the config points to a stopped slot from a previous failed deploy, the health check fails and the router stays unhealthy indefinitely, blocking all future deploys. Before up -d --wait, write the router config to point to the CURRENT live slot (which is still running) and restart the router. This clears the stale unhealthy state. After the new slot passes health checks, switch the router config to the new slot and reload. Also extracted _write_router_conf() to avoid duplicating the nginx config template. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4.2 KiB
Executable File
4.2 KiB
Executable File