<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="margin: 0px;">Generally speaking, I’ll use <span style="color: rgb(0, 0, 0);"><a href="https://github.com/bkeepers/dotenv">dotenv</a> </span>in development. You can easily export your Heroku environment config in that format if necessary (“heroku config --shell > .env”), which can occasionally be quite convenient (albeit obviously rather dangerous — you don’t want to accidentally be fiddling with your production database with a “rails c").</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">In production, that’s platform dependent. If Heroku, then obviously “heroku config”. If something else (lately I’ve been fiddling with AWS OpsWorks), I’ll typically write to /etc/environment on deploy.</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">I’m interested to see how <a href="https://github.com/bkeepers/dotenv-deployment"><span style="color: rgb(0, 0, 0);">dotenv-deployment</span></a> could be used in production. Never used it in anger, and not sure what benefits it provides over writing to a system-wide file like /etc/environment.</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">--</div><div id="bloop_customfont" style="margin: 0px;">Josh McMillan</div><div id="bloop_customfont" style="margin: 0px;">@mcmillatronic</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">On 23 September 2014 at 19:06:23, Phil Nash (<a href="mailto:philnash@gmail.com">philnash@gmail.com</a>) wrote:</div> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>



<title></title>


<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Hi LRUG,<br>
<br></div>
I've been thinking a lot recently about application secrets like
API or database credentials and how they are stored in different
environments for Rails apps. I was hoping that you lovely LRUG
member could share how you deal with this yourself.<br>
<br>
Currently I only tend to deploy apps to Heroku, so I use
environment variables throughout the app, loaded in
development/test environments with the <a href="https://github.com/philnash/envyable">envyable</a> gem, though
<a href="https://github.com/laserlemon/figaro">figaro</a> would do
the same job.<br>
<br></div>
So, what I'm asking is, if you use environment variables for config
in your applications how do you load them in both development and
production environments?<br>
<br></div>
Thanks,<br>
<br>
Phil<br>
<br>
--<br></div>
Phil Nash<br></div>
@philnash<br></div>


_______________________________________________
<br>Chat mailing list
<br>Chat@lists.lrug.org
<br>Archives: http://lists.lrug.org/pipermail/chat-lrug.org
<br>Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org
<br>List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
<br></div></div></span></blockquote></body></html>