Note 001 · Infrastructure1 min read
Boring deploys are a feature
A backup first, pinned images, health checks, and a rollback that runs on its own.
A release should be a non-event. On MN-Core it's one command, ./update.sh <tag>, and the script does the same things every time:
- Dump the database before touching anything.
- Switch to the new pinned image tags. Never
latest. - Run the update in a one-off container: maintenance mode, migrations, caches.
- Restart the services and wait for their health checks.
- Run the instance's own checks: PHP extensions, database, cache, theme.
If any step fails, the script puts back the previous tags and the database dump and starts the old version again. Nobody has to remember the rollback at two in the morning, because nobody does it by hand.
Prove the backups
A backup nobody has restored is a hope. Each instance has a restore test that runs a backup, downloads it, decrypts it, imports it into a throwaway database and compares row counts table by table. With off-site backups switched on, a weekly job test-restores the newest copy as well.
Know what you're shipping
Before a recent release I compared every application file in the running image with the new one. The only difference was the plugin I meant to ship. It takes a minute, and it's the cheapest insurance I know.
- Docker