Deployment, done plainly.
Comparison guides, deployment tutorials and field notes. New posts every two weeks.
Git hooks for deploy discipline
A three-line pre-push hook stops a specific class of Monday-morning incident. The hook is in the repo. The habit is in the hook.
The 30-second deploy timeout
mod_fastcgi's idle timeout is exactly 30 seconds. Under cgi-fcgi, flush() does nothing. The only fix that worked was calling exit() right after.
Blue-green on a 5-euro VPS
Two nginx upstreams and a one-line config swap give you blue-green on any box, without a load balancer or second server.
Three years of pull-based deploys
Push-based deploys have CI pushing to production. Pull-based has the server fetching. After three years on pull, I lost one hour to a bug and zero to leaked credentials.
When a deploy succeeds but your app is down
The deploy pipeline is green. Customers see errors. The gap is almost always in what the health check is actually checking.
Stop deploying on Fridays (but actually)
The real rule isn't about the day of the week. It's about whether the person who can fix what breaks is about to be offline.
Post-deploy checks that actually catch things
A health check that only returns 200 is a tautology. The check has to verify the new code path AND the read path, against a known value.
SSH deploy keys versus personal keys
A per-repo deploy key with read-only access is the only SSH key a production server should ever hold. Your personal key isn't part of the deploy.
Branch-to-domain mapping, in practice
Treat domains as separate destinations, not mirrors. Then the branch-per-domain pattern stops fighting with itself.
The staging branch that lied to me
Staging looked green for three weeks. Production was not. The environment variable had diverged after a copy-paste, and nobody noticed.
Atomic symlink deploys, step by step
A releases/ directory, a current symlink, and shared/ for things that survive across releases. The only tricky part is permissions on the shared uploads folder.
Rolling back is not rolling forward
If your rollback plan is 'deploy the previous commit', you don't have a rollback plan. You have a second deployment that can also fail.