Continuous Delivery

Deploying should be boring. A push to the main branch, and a few minutes later it is live, with migrations run and static files collected as part of the deploy rather than by hand afterwards.

Deploy small and often. A deploy containing one change is easy to reason about when something breaks. A deploy containing three weeks of work is an investigation.

Have a way back before you need one. A one-command rollback, or a previous version you can promote. Practice it once, deliberately, on a day when nothing is wrong.

And remember that migrations do not roll back with the code. If a deploy included a destructive schema change, redeploying the previous version does not restore what it dropped, which is why the safe pattern is several small reversible steps rather than one big migration.

✦ The thing that catches people

A rollback plan nobody has executed is a rollback plan you are guessing about. Deploy something trivial, roll it back on purpose, and time it. Now you know, and you know it on a calm afternoon rather than at ten at night.

Mark this lesson complete

Signed in, your progress follows you to every device.

Next: Practice Test →
← Back