Using docker secrets or environment variables in the configuration #1782
-
Hello. I recently setup Homepage and am going through the documentation. I was unable to find documentation on how to include a docker secret in my yaml configuration or how to include environment variables. In the case of a docker secret, it would be ideal to be able to include the output of a file such as |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I ended up looking at the source code, since I couldn't find anything about environment variable substitution. I think this should be better documented in the docs. Here is the code: https://github.com/benphelps/homepage/blob/63d4c6bdf8474299316965f655fc092656f50154/src/utils/config/config.js#L51C22-L51C22 |
Beta Was this translation helpful? Give feedback.
I ended up looking at the source code, since I couldn't find anything about environment variable substitution.
To get this working, you may place text like
{{HOMEPAGE_VAR_XXX}}
, to directly substitute environment variables. If you define an environment variable named{{HOMEPAGE_FILE_XXX}}
, the contents of the file at the location specified by the environment variable will be substituted.I think this should be better documented in the docs.
Here is the code: https://github.com/benphelps/homepage/blob/63d4c6bdf8474299316965f655fc092656f50154/src/utils/config/config.js#L51C22-L51C22