-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
[FEAT] Support setting/overriding config variables with docker environment variables #52
Comments
Yeah, this is a good idea. I'm using Viper for config parsing, and it supports loading config from the environment as well. I just need to enable it. |
Do you have enabled it? How can we use it? It's a very nice feature to pass notification password to the container and don't commit the password in a config repo. |
Yes, this should already work, though I haven't tested it myself. You should be able to do this (please comment again if this doesnt work):
|
I have tried it this morning. And unfortunatly I didn't find any way get it working. I have dig some part of the code. And I think you need to activate the feature with the Viper method "AutomaticEnv" and optionally the method "SetEnvPrefix". I don't have find any referece to this in your code. https://github.com/spf13/viper#working-with-environment-variables |
apologies, yeah I noticed that yesterday. It's fixed in the Influxdb branch: https://github.com/AnalogJ/scrutiny/blob/influxdb/webapp/backend/pkg/config/config.go#L68-L71 Once that code is merged to master, we can close this issue. |
No problem. I will follow and wait the influxdb branch. Thanks |
Almost all Scrutiny configuration can now be set via environmental variables. (v0.4.1+) Scrutiny web options are prefixed with eg. Closing this for now, feel free to reopen if there are more questions. |
Is your feature request related to a problem? Please describe.
A nice feature implemented by other docker-friendly projects is to allow setting config values via docker environment variables. While certainly not mission-critical this can help keep things neater with all config in e.g. a docker-compose file
Describe the solution you'd like
E.g.
Additional context
E.g. https://wiki.cajun.pro/books/varken/page/breakdown#bkmrk-environment-variable
Thanks for this awesome tool.
The text was updated successfully, but these errors were encountered: