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

Support for Environment variables in config file #788

Open
sam-bowman opened this issue Jun 25, 2024 · 0 comments
Open

Support for Environment variables in config file #788

sam-bowman opened this issue Jun 25, 2024 · 0 comments

Comments

@sam-bowman
Copy link

sam-bowman commented Jun 25, 2024

Is your feature request related to a problem? Please describe.
It would be nice if we could load values from environment variables into the configuration file. I am running Homer in kubernetes, and have some secrets loaded into environment variables on the deployment, but the configuration doesn't seem to support them (at the very least I'm struggling to find any documentation and other methods I've used for other apps doesn't seem to be working).

In my instance, I have some other apps running which I'm pointing homer at. Those apps load their api keys into secrets, then those secrets are mounted onto homer & loaded into environment variables. This way I don't need to manually update them if they ever change etc. But I can't seem to reference the ENVs from the configuration file.

Describe the solution you'd like
Ability to reference ENVs in the configuration file for custom/private values such as API keys.

Describe alternatives you've considered
The only other solutions I can think of is either manually editing the config file on the container once it's loaded, or storing my api keys in my github repo which is holding my configuration file.

Additional context
Here's some of the kubernetes deployment manifest which shows that the secrets have been loaded as environment variables:
image
Along with an output of the below command, which shows that the environment variables are present in the contianer:
sudo kubectl exec -n homer homer-abc -- printenv | grep API_KEY
image

Here's how I've attempted to reference the ENV in my configuration:

  - name: "Sonarr"
    type: "Sonarr"
    apikey: ${SONARR_API_KEY}
    logo: "https://sonarr.tv/img/logo.png"
    subtitle: "Shows-arr"
    tag: "media"
    url: "https://sonarr.example.com"

And the error I see in the browser, showing that it doesn't load the ENV:
image

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

1 participant