Hello,
i’m currently on my way to deploy HA on my already existing docker setup. I had already setup a simple container with it for testing purpose.
After reading a fiew forum posts i noticed that you can actually use an external mariadb & influxdb for HA. As i dont really like running individual sqlite db’s inside each container (centralized databases) i’m now trying to get HA to use my already existing mariadb & influxdb containers as database storage.
My questions now is does the HA docker image provide any environment variables for that (initial setup in docker compose) or do i always have to run the docker container itself first and then manually configure it’s configuration file? Is there a HA doc page where i can look up all the environment variables the HA image provides?
I already searched on the internet/forum/docs but i wasn’t really able to find anything useful there.
The past hour i played around with the configuration.yaml and read a little bit about homeassistant secrets, docker secrets and docker configs.
The way i did it now is:
I created a docker config file which i then mounted on the HA container as my configuration.yaml (includes general settings + db_url as secret)
I created a docker secret which includes my secret from the configuration.yaml which i then mounted as my secrets.yaml (you can specify a custom mount point for docker secrets in docker compose with ‘target:’)
Manually created a user and a database via phpmyadmin on my mariadb container
I started the HA container and as far as i can tell it is actually using the mariadb’s database as storage. Gonna try the same with influxdb tomorrow but it looks like this will be up and running in a breeze too. Thank you very much for helping and pointing me in the right direction