Heroku published a twelve-factor manifesto for modern applications. We use it as a checklist for our projects — and discover how many rules we are breaking.
Key Factors¶
I. Codebase: One repository = one application. Shared code belongs in libraries. III. Config: Configuration in environment variables, not in code. No hardcoded URLs. IV. Backing services: Databases, caches, and messaging as attachable resources. VI. Processes: Stateless processes. Session data stored in an external store (Redis).
Dependencies and Ports¶
II. Dependencies: Explicitly declared (Maven pom.xml). No “it’s installed on the server.” VII. Port binding: The application exports HTTP as a service on a port. Embedded server (Spring Boot). VIII. Concurrency: Scale via processes, not threads. Horizontal scaling.
Deploy and Operations¶
V. Build, release, run: Strict separation of stages. A build produces an artifact; a release adds config. IX. Disposability: Fast startup, graceful shutdown. Containers support this naturally. X. Dev/prod parity: Minimize differences between environments. Docker solves this. XI. Logs: Log to stdout and let the infrastructure collect them. XII. Admin processes: One-off admin tasks as part of the codebase.
The 12-Factor App as a Compass¶
You do not have to follow all twelve factors from day one. But knowing them and working toward them — that is the difference between a modern application and legacy code from the very first commit.
Need help with implementation?
Our experts can help with design, implementation, and operations. From architecture to production.
Contact us