I have Home Assistant running in Docker container. Is it ever possible to execute a command from Home Assistant that recreates the container with the latest image pulled?
Or is it as stupid as sitting on the branch you are sawing?
Today I go to Portainer Web-UI (running on same host in another container) and click Recreate (pull latest image) on the Home Assistant container. Would be nice to have this in the Home Assitant interface…
I do understand the concept for doing it. Need to understand in detail how to adopt it in my setup. I use docker-compose to run all docker services on the machine, but I guess I’ll try to do a restart of only the Home Assistant container here, instead of interrupting all services.
Thanks for the ideas!
I have a test instance where I have a first look, I read the release notes, I do daily backups, but besides that, you cannot actually be sure it won’t break before upgrading.
But, I do have all my docker containers configured in one single docker-compose file. So when I do docker-compose up or down, all services are affected.
Do I have to split it up?
If by “all”, you mean “all”, then yeah, definitely.
A single docker-compose describes the necessary containers for a “project”, so to speak.
Now, you might have, eg, MQTT or MySQL in addition to HA. But if you just do a “up -d” after downloading the new image, it should only restart HA, iirc.
Yes, I do have Mosquitto, Influx, Grafana… and some other services in the same compose-file. Maybe I should split them up according to dependencies instead.