-
Notifications
You must be signed in to change notification settings - Fork 34
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
Configuring basic auth in Distillery #30
Comments
So the problem is evaluated at compile time plug_exporter.ex#L74 I think we could how that particular config is handled, or we could change how deadtrickster/prometheus.ex/lib/prometheus/config.ex#L48 works. The latter seems a better option but a lot more complicated. |
maybe add a switch for an option, like :runtime t |
I'm trying something along those lines but I'm having trouble with the metaprogramming 🤯 |
Having the same problem. Distillery's
|
Im the meanwhile, I was able to workaround this problem by adding https://github.com/CultivateHQ/basic_auth and handling authentication myself. config.exs
router.ex
|
Nice idea @philipgiuliani thanks! |
Use https://github.com/azohra/ptolemy to get your secrets during runtime and have an external system like vault to manage your secrets. |
note: you need delete |
I maintain an Elixir library that I use to conditionally execute Plugs at runtime: https://github.com/akoutmos/unplug We wrote our own predicate for Unplug and then just conditionally execute the |
In my
rel/config/config.exs
I set
But PrometheusExporter isn't using this configuration. If I instead set it on
config/prod.exs
it uses the configuration but the env variables aren't set at build time so it has an empty user and password.I believe it might by related to #25
The text was updated successfully, but these errors were encountered: