Skip to content
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

alternative defaults: .env.defaults #29

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

falkenhawk
Copy link
Contributor

I have a use case where I can't use .env file as defaults easily, without intricate measures, transition periods, automated scripts migrating .env to .env.local etc. (migrating from dotenv on a shared repo with multiple devs constantly working on it)

I can expect that it might be difficult to convince you to add this feature, I tried to explain the reasoning, but I am not too good at writing docs - so if you find this useful, any suggestions how to describe it better would be very welcome...

Below is the new paragraph from README:


Alternative defaults: .env.defaults

In addition to .env, you may also use .env.defaults to store default (fallback) values.

This may come handy e.g. when migrating from dotenv (where it is strongly advised against committing .env file to VCS)
and you already have .env file used to store your local values.

In such case, you may prefer to keep using your existing .env (ignored by VCS) as your local config
and create additional .env.defaults (tracked by VCS) file which will be loaded before .env.

Then at every place .env is mentioned in the docs, read it as: ".env.defaults first, then .env".

@kerimdzhanov
Copy link
Owner

Hey Maciej,

That is an excellent point! I will release a new version with this feature soon.

Thanks for your contributions to the project, it's much appreciated!

@kerimdzhanov kerimdzhanov merged commit 4d2124c into kerimdzhanov:master Jun 25, 2020
@falkenhawk
Copy link
Contributor Author

I'm glad you like it! It's a pleasure :)

@falkenhawk falkenhawk deleted the feature/alternative-defaults branch June 25, 2020 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants