12 factors 15 December 2020 XII. Admin processes (The Twelve Factors) XII. Admin processesRun admin/management tasks as one-off processesThe process formation is the array of processes that are used to do the app’s regular
12 factors 15 December 2020 XI. Logs (The Twelve Factors) XI. LogsTreat logs as event streamsLogs provide visibility into the behavior of a running app. In server-based environments they are commonly written to a file
12 factors 15 December 2020 X. Dev/prod parity (The Twelve Factors) X. Dev/prod parityKeep development, staging, and production as similar as possibleHistorically, there have been substantial gaps between development (a developer making live edits to
12 factors 15 December 2020 IX. Disposability (The Twelve Factors) IX. DisposabilityMaximize robustness with fast startup and graceful shutdownThe twelve-factor app’s processes are disposable, meaning they can be started or stopped at a moment’
12 factors 15 December 2020 VIII. Concurrency (The Twelve Factors) VIII. ConcurrencyScale out via the process modelAny computer program, once run, is represented by one or more processes. Web apps have taken a variety of
12 factors 15 December 2020 VII. Port binding (The Twelve Factors) VII. Port bindingExport services via port bindingWeb apps are sometimes executed inside a webserver container. For example, PHP apps might run as a module inside
12 factors 15 December 2020 VI. Processes (The Twelve Factors) VI. ProcessesExecute the app as one or more stateless processesThe app is executed in the execution environment as one or more processes. In the simplest
12 factors 15 December 2020 V. Build, release, run (The Twelve Factors) V. Build, release, runStrictly separate build and run stagesA codebase is transformed into a (non-development) deploy through three stages: The build stage is a transform
12 factors 15 December 2020 IV. Backing services (The Twelve Factors) IV. Backing servicesTreat backing services as attached resourcesA backing service is any service the app consumes over the network as part of its normal operation.
12 factors 15 December 2020 III. Config (The Twelve Factors) III. ConfigStore config in the environmentAn app’s config is everything that is likely to vary between deploys (staging, production, developer environments, etc). This includes:
12 factors 15 December 2020 II. Dependencies (The Twelve Factors) II. DependenciesExplicitly declare and isolate dependenciesMost programming languages offer a packaging system for distributing support libraries, such as CPAN for Perl or Rubygems for Ruby.
12 factors 15 December 2020 I. Codebase (The Twelve Factors) I. CodebaseOne codebase tracked in revision control, many deploysA twelve-factor app is always tracked in a version control system, such as Git, Mercurial, or Subversion.