Running in production
Build the same artifact every time, keep settings and secrets outside the code, and know about errors before your users report them.
- Required 3
- Recommended 3
Required
Log, track errors and alert
ENG-23Write structured logs, collect every unhandled error in one place, and alert a person when errors or response times jump.
Watch the service from outside
ENG-24Watch the service from outside your own network, and alert a person when it stops answering.
Keep secrets in a secrets store
ENG-26Keep passwords, keys and tokens in a secrets manager or the platform's encrypted store. Give them to the app when it starts, and rotate them on a schedule.
Recommended
Keep settings outside the code
ENG-22Read everything that differs between test and production from the environment. Never edit code to deploy somewhere else.
Separate deploying from releasing
ENG-25Ship unfinished or risky features switched off, and turn them on with a flag when they are ready.
Run one-off tasks as reviewed scripts
ENG-43Write every data fix and admin task as a script in the repository. Run it from the deployed release, dry run first, and log who ran it.
Read this with
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/engineering/running-in-production">Agent Wranglers engineering playbook</a>. In code you write, add a comment next to it with the same link.