Deploys and releases · 10 min read
Zero-downtime deploys on one VPS with Caddy and pm2
Run two copies of a Node app on two ports, health-check the new one, then switch Caddy to it. Commands, the pm2 symlink trap, and measured failed requests.
Shipping new versions of a small app to one server without dropping requests, and rolling back when a release is bad.
Deploys and releases · 10 min read
Run two copies of a Node app on two ports, health-check the new one, then switch Caddy to it. Commands, the pm2 symlink trap, and measured failed requests.
Deploys and releases · 8 min read
Compare systemd and pm2 for one Node app on one server: the pm2 symlink trap, restart after a crash, secrets, memory limits, logs, and which we pick.
Deploys and releases · 9 min read
We sent 20 requests per second through Caddy while restarting a Go service. About one in four failed. Measure your own restart, then pick a fix that fits.
Deploys and releases · 9 min read
Socket activation let a Go service restart without refusing a connection, but slow requests waited over five seconds. Setup, code, and when to use it.
Deploys and releases · 9 min read
Keep each release in its own directory behind a current symlink, switch atomically, prune old ones, and roll back with one command, including the database caveat.
Deploys and releases · 10 min read
Use expand and contract to change a SQLite or Postgres schema while two releases overlap, with the lock pitfalls and the safe forms of common changes.
Deploys and releases · 10 min read
Design a health endpoint and a deploy gate that reject broken releases, with readiness versus liveness, consecutive passes, and the false greens to avoid.
Deploys and releases · 10 min read
Switch a Caddy 2 reverse proxy between two upstream ports with a generated snippet and a graceful reload, with health checks and retry settings explained.