Source
The Twelve-Factor App
Original manifesto from Heroku developers
The Twelve-Factor App
Authors: Adam Wiggins and the Heroku team
Year: 2011
Format: Manifesto/methodology
A methodology for building modern SaaS applications based on experience in developing and operating hundreds of thousands of applications on the Heroku platform. 12 principles that ensure portability, scalability and maintainability.
Foundation
Operating system: overview
12‑Factor relies on a pure application contract with the OS.
Why is this necessary?
The 12-Factor App is a set of principles for creating apps that:
Related topic
Cloud Native
Containers, Functions, Data - cloud-native development practices
Principles of the 12-Factor App
The 12 factors are grouped by application area. Click on a group to highlight related principles, or on a card for a detailed description:
Click on a group to highlight related principles
Codebase
One codebase tracked in revision control, many deploys
Dependencies
Explicitly declare and isolate dependencies
Config
Store config in the environment
Backing Services
Treat backing services as attached resources
Build, Release, Run
Strictly separate build and run stages
Processes
Execute the app as one or more stateless processes
Port Binding
Export services via port binding
Concurrency
Scale out via the process model
Disposability
Maximize robustness with fast startup and graceful shutdown
Dev/Prod Parity
Keep development, staging, and production as similar as possible
Logs
Treat logs as event streams
Admin Processes
Run admin/management tasks as one-off processes
Codebase
One codebase tracked in revision control, many deploys
One repository - many deployments. Each application has a single code base in Git, from which all environments are deployed.
Git repo → dev, staging, prod deploysDifferent branches for different environmentsFoundation
Containerization
Containers are a practical implementation of the 12‑Factor approach.
Modern Application
Containers
Docker and Kubernetes are the ideal implementation of 12-Factor: isolation, port binding, env vars, disposability.
Serverless
AWS Lambda, Cloud Functions - stateless processes, automatic scaling, managed by backing services.
GitOps
ArgoCD, Flux - declarative configuration, versioning of everything, automated deployments.
Beyond Twelve-Factor
Since 2011, the industry has evolved. Modern practices complement the original 12 factors:
