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

Add .[configuration-name].env to environment variables #17686

Closed
1 task done
webberwang opened this issue Jun 20, 2023 · 1 comment · Fixed by #17335
Closed
1 task done

Add .[configuration-name].env to environment variables #17686

webberwang opened this issue Jun 20, 2023 · 1 comment · Fixed by #17335
Labels

Comments

@webberwang
Copy link
Contributor

webberwang commented Jun 20, 2023

Description

Given https://nx.dev/recipes/environment-variables/define-environment-variables

Add

1. apps/my-app/.env.[target-name].[configuration-name]
2. apps/my-app/.[target-name].[configuration-name].env
3. apps/my-app/.env.[target-name]
4. apps/my-app/.[target-name].env
5. apps/my-app/.env.local
6. apps/my-app/.local.env
7. apps/my-app/.env
8. .env.[target-name].[configuration-name]
9. .[target-name].[configuration-name].env
10. .env.[target-name]
11. .[target-name].env

--> .env.[configuration-name]
--> [configuration-name].env

12. .local.env
13. .env.local
14. .env

Motivation

Allows a fallback env for any stage, such as shared test credentials. Otherwise we would have to create a separate env in each lib's folder for the configuration noame

Suggested Implementation

Will create PR

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants