Deploying to production
Any engineer can deploy. A release takes about twelve minutes, goes out on weekdays between 09:00 and 16:00 Lisbon time, and one command reverses it.
Before you deploy
A deploy is safe when the change is small, reviewed and easy to switch off. Most trouble comes from releases that bundle a week of work, so ship each merged pull request by itself whenever you can.
- The pull request has one approval and every check on
mainis green. - A database migration, if there is one, already ran in staging and adds columns without removing any.
- Anything a customer can see sits behind a flag that is off by default.
- You have forty minutes free after the deploy. Do not ship right before a meeting or the end of your day.
Ship the release
The release tool builds the image, runs migrations, then moves traffic over in three steps: 5%, 50% and 100%. It stops by itself if the error rate doubles at any step.
- Post the pull request link in #releases, so support knows what is about to change.
- Pull the latest
mainand run the release command below from the repository root. - Confirm the version it prints matches the commit you expect, then press Enter.
- Stay with the terminal until it prints
Release complete. Do not close the laptop.
git switch main && git pull
corbel release create --env production
corbel release status --followWatch the first fifteen minutes
Most faults show up within fifteen minutes of full traffic. Keep the release dashboard open and compare each number with the hour before.
- Error rate on the API stays under 0.5%.
- The invoice queue drains at its usual pace and holds no job older than two minutes.
- No new issue type appears in the error tracker with your release tag.
Roll back without asking
If any number looks wrong and you cannot explain it in two minutes, roll back first and investigate after. Run corbel release rollback and the previous version takes all traffic in under a minute. Nobody needs to approve a rollback, and nobody will question one.


