Hi,
would like to include the mangement api key as docker secret into the container instead of having to expose the password in the environments section of my docker-compose file.
I would imaging using an environments variable like OPENVPNMONITOR_SITES_<INDEX>_PASSWORD_FILE=/run/secrets/mngmt-key to point to the secret.
Since conf.d does not support multiple backends we would need to iterate the environment variables as shown here and call a function like this to expose the correct env-var before calling confd in entrypoint.sh.
Also the key should be ignored in confd/templates/openvpn-monitor.conf.tmpl#L25 (or it needs a name not starting with OPENVPNMONITOR_SITES).
Hi, would like to include the mangement api key as docker secret into the container instead of having to expose the password in the
environments
section of my docker-compose file.I would imaging using an environments variable like
OPENVPNMONITOR_SITES_<INDEX>_PASSWORD_FILE=/run/secrets/mngmt-key
to point to the secret.Since conf.d does not support multiple backends we would need to iterate the environment variables as shown here and call a function like this to expose the correct env-var before calling
confd
inentrypoint.sh
. Also the key should be ignored inconfd/templates/openvpn-monitor.conf.tmpl#L25
(or it needs a name not starting withOPENVPNMONITOR_SITES
).https://github.com/ruimarinho/docker-openvpn-monitor/blob/889b78496b58bd3a1484987445da055600c68ec9/confd/templates/openvpn-monitor.conf.tmpl#L24-L26
I can create a PR for this if you want to implement it as suggested.