ShtukbaseStandard
package file→ .shtukbase/packages/std-twelve-factor/judges/twelve-factor.md

judges/twelve-factor.md

24 lines, 2.3 KB.

  1. # Judge: the twelve factors
  2. Norm TF-R04. The package's checks see only files: II (lock files), III (addresses in code) and XI (logs to files). A judge sees the rest. The text of the standard: <https://12factor.net/>.
  3. **Who judges.** The owner or a reviewer agent, not the author of the change.
  4. **When.** At the first deployment of a service, when the way of deployment changes, and once every six months.
  5. **What to look at.** For each question, "yes", "no" or "not for us" with a reason.
  6. 1. **I. Codebase.** One application is one repository; all environments deploy its commits. Shared code goes as a library dependency, not as a copy.
  7. 2. **II. Dependencies.** Besides the lock file: the application does not count on system utilities that are not declared (curl, ImageMagick).
  8. 3. **III. Config.** Everything that changes between environments is in environment variables. A test: the repository can be opened to everyone and not a single secret leaks.
  9. 4. **IV. Backing services.** The database, queue and mail are connected by an address from the config; you can swap your own database for a cloud one without editing code.
  10. 5. **V. Build, release, run.** Three separate steps; a release is immutable and has a number; code is not edited in production.
  11. 6. **VI. Processes.** A process keeps no state between requests in memory or on disk; sessions are in an external store.
  12. 7. **VII. Port binding.** The service listens on a port from the config itself; it does not need an external web server injected into the process.
  13. 8. **VIII. Concurrency.** Load grows by the number of processes of different types (web, worker), not by one fat process.
  14. 9. **IX. Disposability.** A process starts in seconds and shuts down gracefully on SIGTERM; a worker's job survives its crash.
  15. 10. **X. Dev/prod parity.** Development has the same kinds of services as production (the same database, not SQLite instead of Postgres); the path from commit to production takes hours, not weeks.
  16. 11. **XI. Logs.** Besides the check: the environment collects the logs of all processes.
  17. 12. **XII. Admin processes.** Migrations and one-off scripts run with the same code and config of the release, as a one-off process.
  18. **Result.** The answers are recorded in the project (a decisions page or a release note). A "no" without a reason is a task with an owner and a deadline.