Comment on Selfhosting Sunday! What's up?
csm10495@sh.itjust.works 2 weeks ago
I have a couple pis that run docker containers including pihole. They have their storage on a centralized share drive.
I had a power outage and realized they can’t start if they happen to come up after the share drive PC is back up.
How do people normally do their docker binds? Optimally I guess they would be local but sync/backup to the share drive regularly.
Sort of related question: in docker compose I have restart always and yet if a container exits successfully it doesn’t restart. Is there an easy way to still have that restart?
MangoPenguin@lemmy.blahaj.zone 2 weeks ago
You should be able to modify the docker service to wait until a mount is ready before starting. That would be the standard way to deal with that kind of thing.
csm10495@sh.itjust.works 2 weeks ago
What if it’s a network mount inside the container? Doesn’t the mount not happen till the container starts?
MangoPenguin@lemmy.blahaj.zone 2 weeks ago
Correct yeah, you’d still need a way on the host to check if the mount is ready though before starting the service. Or you could just do a fixed delay time.