😱 Some notes on Twelve-Factor App
A methodology for building modern, scalable, maintainable software-as-a-service apps.
There is only 1 codebase.
All the dependencies should be fully-decoupled.
you can store configs in environment variables. Environment variables are never grouped together as “environments”, but instead are independently managed for each deploy. This way you won’t see env variables like
job_staging_123 which is not scalable and is difficult to manage when the app gets large.
4. Backing services
Resources can be attached and detached to deploys at will.
5. Build, release, run
Processes are stateless and share-nothing. Any data that needs to persist must be stored in a stateful backing service, typically a database.
7. Port Binding
Each process would bind to 1 port so that other processes can communicate with it through this port.
minimum startup time, able to stop anytime
10. Dev/prod parity
In development environment you output to console, in production you log it to a db or somewhere.
12. Admin processes
One-time only code must ship with application code to avoid synchronization issues.
25 Jun 2017