Andrew's Digital Garden

12 Factor: 3. Config

Store config in the environment

'Config' in this case encapsulates everything that varies between deploys. Keep configuration separated from code.

Twelve-factor apps store config in environment variables. Variables should be granular and [[orthogonal]]. Don't group multiple variables together as a single environment (e.g. switch using NODE_ENV). Individual variables for individual controls scales best.

A good litmus test to check for separate configuration is whether the codebase could be made open source without compromising credentials.

Ideally the app wouldn't even load its config - it just exists at the environment level.

[[12factor]] [[architecture]] [[infrastructure]] [[ops]]

12 Factor: 3. Config