-
-
Notifications
You must be signed in to change notification settings - Fork 538
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
[misc] Add support for NETBIRD_STORE_ENGINE_POSTGRES_DSN environment variable in setup.env #2462
Conversation
Hello @arosberg, thanks for the contribution. Can you add tests to validate the environment variable setting? You can check these files for that:
|
Hello @mlsmaycon The way I wrote the script the environment variable will only be exported if NETBIRD_STORE_CONFIG_ENGINE=postgres and in the test cases NETBIRD_STORE_CONFIG_ENGINE=sqlite so it will not be exported by the script (And therefore not substituted in the compose template). One thing I could do is always export the NETBIRD_STORE_ENGINE_POSTGRES_DSN variable by adding it to the base.setup.env exports netbird/infrastructure_files/base.setup.env Lines 74 to 78 in 059fc7c
Then it would substitute even if NETBIRD_STORE_CONFIG_ENGINE=sqlite (Then I would be able to add test cases). Another option is adding a new test just for postgres but this seems a bit heavy to me. What do you think? |
Quality Gate passedIssues Measures |
that's true, we will add a matrix and a service for that. |
Describe your changes
Updated the configure script and docker-compose templates to better support deployment with postgres. Prevents the need to manually add the NETBIRD_STORE_ENGINE_POSTGRES_DSN environment variable to the docker-compose file after the configuration script is run (https://docs.netbird.io/selfhosted/postgres-store). Also provides warning to the user if the NETBIRD_STORE_CONFIG_ENGINE=postgres and NETBIRD_STORE_ENGINE_POSTGRES_DSN is not set.
Issue ticket number and link
Checklist