“It works on my machine.”
A reassuring sentence… until you’re the person deploying it. 😄
That’s where the 12-Factor App principles come in. They help teams avoid some very familiar headaches.
Settings buried in code.
A dependency installed on someone’s laptop.
Sessions disappearing when a new instance starts.
The name sounds academic. The ideas are pretty practical:
Codebase
One codebase in version control, deployed across environments.Dependencies
Declare what your app needs. “Ask Dave to install it” doesn’t count.Config
Keep environment-specific settings outside your code.Backing services
Treat databases, caches, and queues as attached resources.Build, release, run
Separate these stages so you know exactly what you’re deploying.Processes
Keep processes stateless. A user’s session shouldn’t depend on which instance answers.Port binding
Expose your service through a port.Concurrency
Scale by adding process instances.Disposability
Start quickly. Shut down gracefully. Finish or safely hand off work.Dev/prod parity
Keep environments similar. Fewer “but it worked locally” surprises.Logs
Emit logs as event streams so your platform can collect and route them.Admin processes
Run migrations and maintenance tasks using the same code and configuration as your app.
You don’t need to tackle all 12 at once.
Start with the one that keeps causing trouble. Maybe it’s config. Maybe it’s shutdown behavior. Maybe only one person knows how deployments work, and they’re going on holiday. 😅
Which factor has been hardest to get right on your team?

Top comments (0)