The Twelve Factors
The factors for Twelve-Factor Apps are as follows:
- Code base. Store the code in a single repo and differentiate only by configuration.
- Dependencies. Declare them explicitly and clearly.
- Config. Config through the environment.
- Backing services. Any backing service should be treated as an attached resource.
- Build, release, run. Differentiate between build and run states.
- Processes. Execute the app as a stateless process.
- Port binding. Expose services through ports.
- Concurrency. Set up the services as processes.
- Disposability. Fast start and graceful shutdown.
- Dev/prod parity. All environments should be as similar as possible.
- Logs. Send logs to event streams.
- Admin processes. Run one-off admin processes independently.
The factors can be grouped around different concepts:
- Code base, Build, release, run, and Dev/prod parity work around the idea of generating a single application...