[deleted]
Wait Timing for Docker Containers
Help
Having some trouble. Frigate is running as a docker container on Unraid, which obviously starts way faster than my home assistant VM which is also where my MQTT server is. Due to this frigate autostarts and crashes every time the Host restarts. I've tried to time the wait to start under settings for the frigate container, but even on a 10-minute timer it doesn't autostart. Without moving my MQTT server to docker, how can i tell unraid to start the frigate container, after my home assistant vm has booted up?
Sort by:
Best
Open comment sort options
Comments Section
https://www.reddit.com/r/Ibracorp/comments/orz72s/unraid_how_to_install_and_configure_docker_folder/
He talks about arranging docker apps with the slider to load different containers first, and you can set them on a delay timer.
Check this wiki page for more info: https://wiki.unraid.net/Manual/Docker_Management#Controlling_container_auto-start
Overall:
Make sure your HA container is higher up on the list than frigate. Unraid starts containers from the top one down
Add a 120s wait to the HA container, the wait happens after the container starts, and it is how long to wait before starting the next container
Hopefully this will get what you need =) In my case, I'm not running frigate via unraid, but on a separate host with a HA VM. Frigate is set to automatically restart if it fails, so it may fail on MQTT, then restart, and restart again until MQTT is online.
I wonder if you could set a similar behavior in unraid? I've never tried. The raw docker configuration can be found here: https://docs.docker.com/config/containers/start-containers-automatically/
Edit: Maybe adding the Extra Parameters `--restart unless-stopped`
Going to look into the start unless stopped option that’s the idea situation
All I had to do was add
--restart=on-failure
under the Extra Parameters (make sure advanced view is on) setting in the Frigate container, and now it just continuously restarts each time it fails to start, until the HA VM starts up. Here's every restart policy listed here: https://docs.docker.com/engine/reference/run/#restart-policies---restart