3 ms·
This is clearly outlined in 'The Twelve-Factor App'. http://12factor.net/config http://12factor.net/config System-dependent configuration should be set via EN
by EvanPlaice 11y ago
This is clearly outlined in 'The Twelve-Factor App'.
http://12factor.net/config http://12factor.net/config
System-dependent configuration should be set via ENV variables to prevent the following: one, it prevents sensitive credentials from mistakenly being added to source control; two, it simplifies deployments and prevents mistakes (ex pushing a debug configuration to production) from exposing the underlying structure of your applications.
You should never have to set a --debug flag or parameter via a config file. Rather, your development machine itself should have the environment configured to enable debugging.
There really is no downside to this approach. Environmental Variables are trivial to configure and once they're set they usually don't need to change.
- Stasis5001 11y agoDumb question. When, say, setting up a new server, you need to set up the environment variables to have your production credentials. How do I automate this process if the variables aren't stored in a central repo? Keeping a static file on my computer could maybe cut it, but won't help me get new team members able to deploy, unless I email them that file or something. Is having a file stored in email or dropbox or something really way better than having it stored in a private git repo? I assume there's a clever way to do this that I'm missing?