Every time I upgrade HA, my docker settings get deleted, and I have to manually reconfig & restart the homeassistant container with Portainer.
How do I tell Supervisor I have custom docker settings, please?
Specifically, I need to configure:
Devices: /dev/ttyACM0 & /dev/hidraw0 (for Conbee II & WyzeSense bridge) max-file & max-size (for limiting docker log size)
Container memory limit 2GB
I’m running supervised/supervisor on ubuntu 18.04.
You should mount a persistent volume on /config when you launch the docker container. You can do this with the -v option on the docker run command. Devices are passed into the container in a similar way using the --device option.
Alternatively, if you use docker-compose, then in your docker-compose.yaml (or whatever) file, you could have something like this (from mine)
All the stuff specified in the docker-compose file can also be passed as options to docker run when you invoke it; do docker run --help to see what the specific options might be.
What David said.
I gotta believe there are many people running HA with Supervisor. And a good number of those folks have a Conbee II (or other zigbee coordinator) and/or Wyzesense bridge that need the linux device to appear inside the HA container for ZHA and addons to work.
I found in the source code where the HA container is started, and I think this is the moment when the host devices can be passed to the container:
I also found in the code that passing host devices into HA Addons is totally supported today, and I asked for help in the Development section of this forum:
My next step was to open a github issue for Supervisor, but I’ve been too busy to write this all up. I’m willing to write code to make this happen, but I could not figure out how a user’s config can be passed to this part of the Supervisor code.