Config

  • Resource handles to the database, Memcache, Redis, etc..
  • All system/service configuration is stored in a separate and secure environment
    • Configuration is seperated from codebase
    • Configuration is managed entirely by variables that can be changed/established on build
    • Production Config files are managed in a private repository with 2-factor auth or managed as prompts
    • Production Config files are included in .gitignore
  • Configuration is anything that may vary between different environments. Code is all the stuff that doesn’t.
  • Apps sometimes store config as constants in the code. This is a violation of twelve-factor, which requires strict separation of config from code. Config varies substantially across deploys, code does not.
  • The twelve-factor app stores config in environment variables (often shortened to env vars or env). Env vars are easy to change between deploys without changing any code; unlike config files, there is little chance of them being checked into the code repo accidentally; and unlike custom config files, or other config mechanisms such as Java System Properties, they are a language- and OS-agnostic standard.

Importance: Medium

agence