netbox-community / netbox-docker

🐳 Docker Image of NetBox
https://github.com/netbox-community/netbox-docker/wiki
Apache License 2.0
1.81k stars 828 forks source link

Start containers automatically #1145

Closed kovacs-andras closed 7 months ago

kovacs-andras commented 8 months ago

Dear Team,

Starting containers automatically after a host reboot or sg. similar would be great. But I'm not 100% sure it's necessary with docker-compose.test.yml What do you think?

"no is the default restart policy, and it does not restart a container under any circumstance." https://docs.docker.com/compose/compose-file/compose-file-v3/#restart

This project is great and many thanks for all your work!

Best regards, Andras Kovacs

barmalej1 commented 7 months ago

crontab works great: @reboot (sleep 60s ; cd /netbox/netbox-docker ; /usr/bin/docker compose start )&

tobiasge commented 7 months ago

I don't think this should be the default for all installations. But you can easily add those restart options in your docker-compose.override.yml file.