On Wed, Sep 10, 2014 at 09:04:42AM +0300, Michael Snoyman wrote:
> If you have an opinion either for or against the proposed environment variable
> changes, please write back to this thread.
I'll admit, I haven't been following the discussion so I'm not sure what the
reason is for the opposition to environment variables. When I first saw the note
about it as a potential change I was happy. Configuration via environment
variables is an important tenant of 12-factor[1] and I also happen to find it
quite pleasant in general.
In my open source apps, configuration is often split with things that can be
committed to source code and things that can't. Therefore I have to use[2]
environment variables anyway, so doing everything in that way would be a
simplification for me.
I was also going to mention a library I made to make env-based configuration
easier[3]. It's a port of the dotenv gem used in Rails. Since it's annoying to
ensure certain environment variables are set on your development or testing
boxes, it looks for a ./.env file (kept out of version control) and parses it
for variables to be set. Projects can ship a .env.sample with default or dummy
values to help with bootstrapping. It's quite nice.
Anyway, I thought I would make a vote in favor and share that library in case it
addresses any inconveniences raised by others.
1:
http://12factor.net/config
2:
https://github.com/thoughtbot/carnival/blob/master/Application.hs#L111
3:
https://github.com/pbrisbin/load-env
Thanks,
Pat
--
patrick brisbin