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 5
- Recommended 1
Required
Make builds repeatable
RequiredThe same commit always gives the same build. Pin the language version, the tools and every dependency.
Keep settings outside the code
RequiredRead everything that differs between test and production from the environment. Never edit code to deploy somewhere else.
Log, track errors and alert
RequiredWrite structured logs, collect every unhandled error in one place, and alert a person when errors or response times jump.
Watch the service from outside
RequiredWatch the service from outside your own network, and alert a person when it stops answering.
Keep secrets in a secrets store
RequiredKeep 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
Separate deploying from releasing
RecommendedShip unfinished or risky features switched off, and turn them on with a flag when they are ready.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers engineering playbook: https://agentwranglers.se/playbook/engineering/running-in-production.