Skip to content

Latest commit

 

History

History
38 lines (37 loc) · 2.12 KB

File metadata and controls

38 lines (37 loc) · 2.12 KB

https://12factor.net/uk/

  1. Codebase: Manage all code in version control systems (like Git or Mercurial). The codebase comprehensively dictates what is deployed.
  2. Dependencies: Dependencies should be managed entirely and explicitly by the codebase, either vendored (stored with the code) or version pinned in a format that a package manager can install from.
  3. Config: Separate configuration parameters from the application and define them in the deployment environment instead of baking them into the application itself.
  4. Backing services: Local and remote services are both abstracted as network-accessible resources with connection details set in configuration.
  5. Build, release, run: The build stage of your application should be completely separate from your application release and operations processes. The build stage creates a deployment artifact from source code, the release stage combines the artifact and configuration, and the run stage executes the release.
  6. Processes: Applications are implemented as processes that should not rely on storing state locally. State should be offloaded to a backing service as described in the fourth factor.
  7. Port binding: Applications should natively bind to a port and listen for connections. Routing and request forwarding should be handled externally.
  8. Concurrency: Applications should rely on scaling through the process model. Running multiple copies of an application concurrently, potentially across multiple servers, allows scaling without adjusting application code.
  9. Disposability: Processes should be able to start quickly and stop gracefully without serious side effects.
  10. Dev/prod parity: Your testing, staging, and production environments should match closely and be kept in sync. Differences between environments are opportunities for incompatibilities and untested configurations to appear.
  11. Logs: Applications should stream logs to standard output so external services can decide how to best handle them.
  12. Admin processes: One-off administration processes should be run against specific releases and shipped with the main process code.