Zero-Downtime Deploys & Host Watchdog
A deploy-reliability release with a stable edge proxy, twin app/web pairs, host monitoring and a release/rollback runbook.
Reliability
3- The edge alias is owned by a stable nginx proxy; two app/web pairs run behind it and are rolled one at a time with health gates, SIGQUIT drain and automatic failover.
- The CI gate and migrations run before any pair rolls; a failed gate leaves the live pairs and worker untouched.
- Caddy switches to the proxy before the legacy web is removed; X-Forwarded-Proto is preserved end to end.
Operations
2- Host watchdog every minute: HTTP /up, landing and login, all stack containers, RAM/swap/disk, bounded OOM events, app health alerts, dedupe and ntfy/webhook delivery.
- Added a user-run swapfile script for the exhausted 4G host swap and release tags/rollback runbook.
Known limitations
2- The one-time cutover and normal recreates still have a short readiness window; Reverb websockets reconnect once per deploy and both pairs down returns an honest 502.
- The swapfile needs a one-time sudo run; live mail, payments, AI, S3/offsite backup and monitoring credentials remain external.