- Use one codebase in version control, deploying it to different environments.
- Explicitly declare all dependencies, keeping them isolated for consistency.
- Store configurations in environment variables, not in the codebase.
- Treat external services (like databases) as easily replaceable resources.
- Separate building, releasing, and running to ensure controlled deployments.
- Run the app as stateless processes; use external storage for data.
- Bind the app to a port, so it’s accessible as a service.
- Scale by running multiple instances of processes.
- Make processes start and stop quickly to aid scalability.
- Keep development and production environments similar.
- Treat logs as event streams, accessible for monitoring.
- Run admin tasks (e.g., database updates) separately from the main app.