-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[request] Clarify Behavior When Using Environment Specific .env Alongside a Generic .env in README #68
Comments
Yes, clarification would be gladly appreciated. Meanwhile, can anyone explain @1ndivisible 's questions? Thanks! |
Along these lines, are there extra configuration requirements for it to load the .env.development file? I can only define variables in .env right now, using Rails 2.3.5., the .env.development does not appear to be loading when I start the application. |
From
|
I'm under the same confusion, I thought the .env.ENVIRONMENT files would be up loaded automatically, but it doesn't. I read this https://github.com/bkeepers/dotenv/blob/master/lib/dotenv/railtie.rb#L14, so basically if you don't use rails you need to manually indicate the .env files you want (when using environment specific settings). I think the README should specify this. I ended up doing this: https://github.com/chischaschos/scanty/blob/master/main.rb#L5 |
Pull requests are welcome. Note that the auto-loading of ".env.#{Rails.env}" is going to be split out into a separate gem soon (#95). |
From trawling through the issues it appears that Dotenv will load a
.env
file and then any environment specific files:env.staging
etc.However this isn't clear from the README. Please add clarification for the behaviour:
.env
file even if there is an environmental specific file aswell? In what order?.env
file, what happens if it is defined again in the environmental specific file? Is it overridden?It would also be worth mentioning that Dotenv is used by Foreman as I think that is a good selling point.
The text was updated successfully, but these errors were encountered: