-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Feature Request] Allow variables in config file #60
Comments
I believe something like this could work, and would tie into the other feature request for configuration via labels. I'll add this to the list of future enhancements. |
Yes this would greatly facilitate saving the config file in git. |
@JazzFisch @shamoon I'm considering a simple substitution of environment variables into the configs as they are loaded, but for security reasons, limiting it to environment variables that start with "HOMEPAGE_". For example: - Media:
- Jellyfin:
icon: jellyfin.png
href: https://jellyfin.mydomain.tld
description: Static Video Entertainment
app: jellyfin
namespace: media
widget:
type: jellyfin
url: https://jellyfin.int.wynning.tech
key: {{HOMEPAGE_JELLYFIN_APIKEY}} Then the |
Just to clarify, currently docker secrets cannot be used in the yaml config files? I attempted using docker secrets and it appears that the container reads the secret correctly but I cannot get it working with the config files. Hiding passwords and api keys from plain-text would be a much appreciated addition to this project. Thank you! |
With this approach, no. Perhaps I could expand the solution with an additional prefix for file-based secrets. We could support the "HOMEPAGE_" prefix for direct values and "HOMEPAGEFILE_" prefix for secrets stored in files. So at runtime it would read the file contents from the specified file and substitute it in just as it would for normal variables. |
An alternative could be to extend the variables themselves. For instance, the widgets' "key" field could also have "key-var" and "key-file" which would map to an environment variable and a file respectively. We would need to do the same for credentials in other locations as well. This would be a less flexible approach, but would address the primary concern of storing credentials more securely. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. |
Would it be possible to allow variables in the config files?
E.g.
Then in the compose file, we can do something like:
(note: key used was randomly generated for this request)
The text was updated successfully, but these errors were encountered: