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

env var improvements #267

Open
happysalada opened this issue Jul 26, 2023 · 0 comments
Open

env var improvements #267

happysalada opened this issue Jul 26, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@happysalada
Copy link
Contributor

happysalada commented Jul 26, 2023

Is your feature request related to a problem? Please describe.

in projects, there are often different environments for dev, staging and prod for example. By environment I mean a collection of env vars that together represent the settings to run a program on a machine.
There are various reasons why different environments should be available on local . (you might want to connect to the staging database instead of your local dev one...).
env vars also raise the concern of committing secrets to the repo

Describe the solution you'd like

  • The first step I think is to be able to name a collection of env vars. staging, dev and production would be example of such collections.
  • Being able to merge collections would be great too. You could have a collection for common, and then specifics for each of the environment, then you would just merge the common with the specifics to get the full environment.
  • Having a command to be able to switch easily between different environments would be amazing. There could be a default environment, but with a command, I would just switch to staging and continue my manipulations there.
  • Being able to integrate with something like agenix would be amazing to prevent leaking secrets to the whole team. Incidentally agenix has a mechanism to handle different groups of users.
    Describe alternatives you've considered

the alternative is to maintain several .env files and use dotenv-cli to generate environments for each commands. You can use a command to generate the proper environment. You don't commit the .env files you create since they contain secrets. But this workflow works at the moment.

Additional context

I think most teams need a workflow with different environments, but I'd be happy to describe in more details any part of the process that seems foreign.

PS: thanks again for taking the time to make this project. I've been using this shell everywhere since as long as I've known it.

@happysalada happysalada added the enhancement New feature or request label Jul 26, 2023
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

No branches or pull requests

1 participant