I tried searching the forums, but didn’t find what I need (and must have missed it in the docs as well).
Is it possible to set environment variables when using
docker-compose to run Home Assistant? My
docker-compose.yaml looks like this
--- version: "3.3" services: hass: container_name: hass image: homeassistant/home-assistant:latest volumes: - ./data:/config - /etc/localtime:/etc/localtime:ro environment: - TZ=Europe/Berlin restart: always network_mode: host
Example use case: I need the
myfitnesspal pip package. I can manually add it by
docker exec -it hass pip install myfitnesspal on the machine Home Assistant runs on, but this needs to be repeated every single time the docker container gets an update.
One could also modify the
Dockerfile and build a custom Home Assistant image, but I would prefer always updating by using the official image.
I found this example on github, where the user sets a ton of environment values… but some of those (for example,
HA_HANNES_WORK_LATITUDE) look arbitrary to me.
Are the official environment values one can set in their
docker-compose.yaml to define things such as pip packages to be installed (besides those that are installed anyway, of course)? And if so, where can I find a complete list of what’s possible to integrate?
Thank you for your input