Beyond the Twelve-Factor App
beyond_the_12-factor_app_pivotal
beyond_the_12-factor_app_pivotal
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
CHAPTER 5<br />
Configuration, Credentials,<br />
and Code<br />
<strong>Factor</strong> 3 of <strong>the</strong> original 12 factors only states that you should store<br />
configuration in <strong>the</strong> environment. I believe <strong>the</strong> configuration guidance<br />
should be more explicit.<br />
Configuration Chemistry<br />
Treat configuration, credentials, and code as volatile<br />
substances that explode when combined.<br />
That may sound a bit harsh, but failing to follow this rule will likely<br />
cause you untold frustration that will only escalate <strong>the</strong> closer you get<br />
to production with your application.<br />
In order to be able to keep configuration separate from code and<br />
credentials, we need a very clear definition of configuration. Configuration<br />
refers to any value that can vary across deployments (e.g.,<br />
developer workstation, QA, and production). This could include:<br />
• URLs and o<strong>the</strong>r information about backing services, such as<br />
web services, and SMTP servers<br />
• Information necessary to locate and connect to databases<br />
• Credentials to third-party services such as Amazon AWS or<br />
APIs like Google Maps, Twitter, and Facebook<br />
17