ruby on rails - How are environmental variables safer than secrets.yml -


in rails, secrets.yml file has default comment stating shouldn't keep production secrets in repository, , instead should read values environment. have read pretty everywhere keep secret keys various apis in environment file keep them safe.

my question is, how safer? if have public repo, can't in production.rb file secret keys instead of looking in secrets.yml? don't understand how putting them in different file in same repo safer.

lastly, if don't put environment files in repo, how server these files if building them github repo?

i realize i'm missing in process advice on helping me understand process appreicated.

you're right putting them in secrets.yml vs production.rb makes 0 difference. putting them in file checked source control "no no" reading about.

as how them onto server, depends on setup. myself use ansible manage servers , environment variables deployed part of that. don't have that, need way have file available on server.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -