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

Computed env vars #272

Open
arichiardi opened this issue Apr 29, 2022 · 1 comment
Open

Computed env vars #272

arichiardi opened this issue Apr 29, 2022 · 1 comment

Comments

@arichiardi
Copy link

arichiardi commented Apr 29, 2022

Hi there, I bumped into this project while having a look at tools that generate .env files.

First of all thanks for your work on it as it nearly solves all our problems.

There is one use case that we have here, related to connection strings: we basically compose the url from other vars in the environment, e.g.:

DB_HOST=localhost
DB_PORT=5432
DB_USER=acuity_user
DB_PASSWORD=INeedToBeMoreSecureThanThis!
DB_NAME=appserver

# The url is the only var appserver ever uses to connect to the DB
DB_URL="jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}?user=${DB_USER}&password=${DB_PASSWORD}!&ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory"

At the moment dump-env does not replaces values in DB_URL. It would be nice if it did 😄

Thanks for reading ☮️

@sobolevn
Copy link
Member

sobolevn commented May 1, 2022

Yes, this is a cool idea indeed.
The code is pretty trivial, so PR is welcome! 👍

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