SCHEMATIC · SOFTWARE-AS-A-SERVICE METHODOLOGY
The Twelve-Factor App
A build spec for cloud-native services — portable, stateless, disposable. Twelve stations, four phases, one pipeline from codebase to running process.
By Vimal Maheedharan — Technical Architect & SRE Consultant
Reference: 12factor.net — originally authored by engineers at Heroku
PH.01
Foundation
// what the app is made of
01GIT
Codebase
One codebase tracked in revision control, many deploys from it.
02PKG
Dependencies
Explicitly declare and isolate every dependency — never rely on system-wide packages.
03ENV
Config
Store config that varies between deploys in the environment, not in code.
PH.02
Deploy
// how it gets from code to running
04SVC
Backing Services
Treat DBs, queues, caches as attached resources — swappable via config, not code changes.
05CI/CD
Build, Release, Run
Strictly separate the build, release, and run stages — never modify code at runtime.
06STATE
Processes
Execute as one or more stateless processes — persistent data lives in a backing service.
PH.03
Run
// how it behaves live
07:PORT
Port Binding
Export services via port binding — the app is completely self-contained.
08×N
Concurrency
Scale out via the process model — many small processes over one large one.
09⏱
Disposability
Maximize robustness with fast startup and graceful shutdown.
PH.04
Operate
// how it's watched and maintained
10≈
Dev/Prod Parity
Keep dev, staging, and production as similar as possible.
11STDOUT
Logs
Treat logs as event streams — write to stdout, let the environment route them.
12$
Admin Processes
Run admin/management tasks as one-off processes in an identical environment.
"Code Depends Carefully:
Backing Builds
Process Ports Concurrently,
Disposable Dev
Logs Admin."
CDCB²P² · CD²LA — one letter per factor, in sequence 01→12