<div dir="ltr"><span class="im" style="font-family:arial,sans-serif;font-size:13px">On 23 September 2014 19:16, Josh McMillan <span dir="ltr"><<a href="mailto:josh@joshmcmillan.co.uk" target="_blank">josh@joshmcmillan.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="margin:0px"><br></div><div style="margin:0px">I’m interested to see how <a href="https://github.com/bkeepers/dotenv-deployment" target="_blank"><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 style="margin:0px"><br></div></div></blockquote></span><div style="font-family:arial,sans-serif;font-size:13px">(This is a slight tangent, so apologies in advance, but...) I'd also be interested to know about this, and particularly about what the perceived advantages of dotenv in this context are.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">My understanding of the reasoning behind using env vars for config in the 12 factor thing was in order to entirely seperate config from the codebase, and rely on a standard, unix-y way of passing them in from the system (ie environment variables).</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">It seems to me that adding a bunch of coupling in the form of a gem dependency, 'Dotenv.load' call, and .env file is a rather convoluted way of reinventing config/foo.yml files while adhering to the letter (and not the spirit) of the 12-factor guidelines. It's clearly popular though, so I feel like I'm missing something. Anyone care to tell me why I'm wrong?</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Thanks,</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Tim</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 September 2014 19:16, Josh McMillan <span dir="ltr"><<a href="mailto:josh@joshmcmillan.co.uk" target="_blank">josh@joshmcmillan.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="margin:0px">Generally speaking, I’ll use <span style="color:rgb(0,0,0)"><a href="https://github.com/bkeepers/dotenv" target="_blank">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 style="margin:0px"><br></div><div 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 style="margin:0px"><br></div><div style="margin:0px">I’m interested to see how <a href="https://github.com/bkeepers/dotenv-deployment" target="_blank"><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 style="margin:0px"><br></div><div style="margin:0px">--</div><div style="margin:0px">Josh McMillan</div><div style="margin:0px">@mcmillatronic</div><div><div class="h5"><div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div><div 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" target="_blank">philnash@gmail.com</a>) wrote:</div> </div></div><blockquote type="cite"><span><div><div></div><div><div><div class="h5">






<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" target="_blank">envyable</a> gem, though
<a href="https://github.com/laserlemon/figaro" target="_blank">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></div></div>


_______________________________________________
<br>Chat mailing list
<br><a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a>
<br>Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" target="_blank">http://lists.lrug.org/pipermail/chat-lrug.org</a>
<br>Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/options.cgi/chat-lrug.org</a>
<br>List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a>
<br></div></div></span></blockquote></div><br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" target="_blank">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>
Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>
List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div>