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

[Feature Request] prevent environment variables clash. #290

Closed
1 task done
spankie opened this issue Aug 16, 2024 · 3 comments · Fixed by #307
Closed
1 task done

[Feature Request] prevent environment variables clash. #290

spankie opened this issue Aug 16, 2024 · 3 comments · Fixed by #307
Assignees
Labels
enhancement New feature or request

Comments

@spankie
Copy link
Contributor

spankie commented Aug 16, 2024

Tell us about your feature request

Right now the default environment variables are generic e.g. DB_HOST, which can be used by other applications running locally. This can cause clashes by overwriting previous environment variables that already exist. My suggestion is to prefix the default environment variables with the name of the app created. For example, if I create an app with the name some-app the environment variables would be prefixed with a sanitized name of the app (SOME_APP) like this: SOME_APP_DB_HOST

Disclaimer

  • I agree
@spankie spankie added the enhancement New feature or request label Aug 16, 2024
@H0llyW00dzZ
Copy link
Contributor

Tell us about your feature request

Right now the default environment variables are generic e.g. DB_HOST, which can be used by other applications running locally. This can cause clashes by overwriting previous environment variables that already exist. My suggestion is to prefix the default environment variables with the name of the app created. For example, if I create an app with the name some-app the environment variables would be prefixed with a sanitized name of the app (SOME_APP) like this: SOME_APP_DB_HOST

Disclaimer

  • I agree

Having known this, I think it would be better to use BLUEPRINT_DB_HOST or BP_DB_HOST as the prefix for the environment variables.

@spankie
Copy link
Contributor Author

spankie commented Aug 16, 2024

Okay, but this would involve the user having to change it again which they can do initially without the BLUEPRINT_ prefix. And if other projects are created their environment variables will all have the same prefix.

I understand that godotenv does not persist the environment variables, but it would be better to have these prefixed with the name of the app.

@Ujstor
Copy link
Collaborator

Ujstor commented Aug 22, 2024

We can change the variable names, and the PR will be accepted if someone implements this.

@Ujstor Ujstor self-assigned this Sep 19, 2024
@Ujstor Ujstor mentioned this issue Sep 19, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants