mcuadros / ofelia

A docker job scheduler (aka. crontab for docker)
MIT License
3.03k stars 175 forks source link

Add an option to stop all containers on job-run, then start them again after completion. #255

Open douglasparker opened 8 months ago

douglasparker commented 8 months ago

Hey, I use ofelia to backup my servers using restic.

I currently backup docker volumes while containers are running, but ideally there would be a way for ofelia to stop all running containers and to then start them again after completion.

A setting to decide if ofelia should start containers again based on failure, success, or both would also be nice just to add more flexibility.

Containers that were running with compose should start again using their compose file, and containers running with docker run should start again with the same args. Similar to how Watchtower handles starting containers again after an update.