#Changing the environment variables used to run an addon's container
1 messages · Page 1 of 1 (latest)
I don't think you can. Not directly. Which settings?
A great many of them, apparently. I've done a bit of source-diving to figure out how I'm supposed to affect the envvars of the VaultWarden process, and from the looks of the addon's source, the expected way is to pass them to the container itself; the with-contenv helper in the shebang causes that script to inherit whatever envvars the container was started with
See step 6 in the docs https://github.com/hassio-addons/addon-bitwarden/blob/main/bitwarden/DOCS.md#installation if it can't be set there, you can't set it with the addon
That's the page I screenshotted above, the one which explicitly says "these settings require a restart and must be set with environment variables". When you say that those options can't be set with this addon, are you speaking from personal experience, having attempted to set them yourself (Github tells me that you were a contributor some years back, so I assume you have it installed)? Or are you only saying that from having looked through the documentation just now?
If those options can't be set, then push notifications can't be enabled, and that means no autosyncing vaults to mobile, apparently. If there truly is no way to set the environment variables used to start an addon container, then I might need to file a PR against the addon in order to expose that functionality via the config UI, but I'd really rather keep the source hacking to a minimum if at all possible.
In summary, if you aren't happy with the addon implementation, fork it, or run it elsewhere.
wha? where'd this hostility come from?? 😳 the addon implementation is fine, it already does support passing the environment variables through to VW. all I'm trying to do is set some environment variables, which is such a common way of configuring containers that I assume Hass has some way to do it
I'm just so new to this platform that I don't even know where to look yet
Some addons have an option do add init commands which could be used hack this in but this addon doesn't.
For example: https://github.com/hassio-addons/addon-ssh/blob/main/ssh/DOCS.md#option-init_commands
Addons are very opinionated and kind of restrictive when you're used to run your own docker containers.
again: the addon doesn't need changing? it's already configured to pass environment variables through? no need for init commands at all
if this were, say, a docker or k8s cluster that I was managing, I'd know where to start looking, but I just have no idea how Hass's containers are configured
But the addon does not seem to allow you to set these.
rrrright, which is why I'm asking for where in HA itself to go to configure that environment
I feel like I'm saying the same thing over and over again, which usually means I'm not saying something right
but I'm not sure how to say it better
Addons are managed by the supervisor. I'm not aware lf an option to configure this outside of the addon settings.
that's okay! hopefully someone who does know will come along at some point 😄
I understand what you want but I'm afraid this is not supported by HAOS unless the developer of the addon allows it.
the info that it's the supervisor that manages the addon containers is really helpful, though, that gives me a good place to start looking for where to find or insert the functionality ❤️ thanks!