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

Overriding files #96

Open
nix6839 opened this issue Mar 29, 2024 · 1 comment
Open

Overriding files #96

nix6839 opened this issue Mar 29, 2024 · 1 comment

Comments

@nix6839
Copy link

nix6839 commented Mar 29, 2024

Coming from bkeepers/dotenv, is there a way to use these files too: bkeepers/dotenv#what-other-env-files-can-i-use?

Hierarchy Priority Filename Environment Should I .gitignoreit? Notes
1st (highest) .env.development.local Development Yes! Local overrides of environment-specific settings.
1st .env.test.local Test Yes! Local overrides of environment-specific settings.
1st .env.production.local Production Yes! Local overrides of environment-specific settings.
2nd .env.local Wherever the file is Definitely. Local overrides. This file is loaded for all environments except test.
3rd .env.development Development No. Shared environment-specific settings
3rd .env.test Test No. Shared environment-specific settings
3rd .env.production Production No. Shared environment-specific settings
Last .env All Environments Depends (See below) The Original®

From: dotenv-rs#41

@allan2
Copy link
Owner

allan2 commented Mar 29, 2024

The specific filenames like .env.development and .env.local are not supported in this crate but you can achieve the same functionality using "from path" functions and override functions. You can see the list of functions on doc.rs.

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

No branches or pull requests

2 participants