I'm trying to properly manage a compose file with systemd. I'm using rootless podman.
What I want to achieve:
- being able to restart a container if it fails
- being able to restart the whole compose file if all fail
I can't quite figure out on how to manage it. What I've read (and tried) so far:
with podman
- I can not use the
restartoptionalways, onlyon-failure.
with systemd
- I can use the
Type=oneshotandRemainAfterExit=yes, but then I can't use theRestartoption - I can use
Type=simple, but then theExecStart=podman-compose up -druns, and immediately stops it again, as systemd thinks it's stopped
Any hints are much appreciated.