The 12-factor methodology is a set of best practices for building software-as-a-service (SaaS) applications that are:
Build for scale from the start
Use declarative format for setup and deploy
Strictly separate build and run stages
Export services via port binding
Use a dependency injection
Store config in the environment
Treat logs as event streams
Run as a single process
Disposability
Maximize robustness with fast startup and graceful shutdown
Keep development, staging, and production as similar as possible
Treat backing services as attached resources