1

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 restart option always, only on-failure.

with systemd

  • I can use the Type=oneshot and RemainAfterExit=yes, but then I can't use the Restart option
  • I can use Type=simple, but then the ExecStart=podman-compose up -d runs, and immediately stops it again, as systemd thinks it's stopped

Any hints are much appreciated.

divadpoc
  • 121

1 Answers1

1

thank you both for your inputs (in the comments).

I switched already to quadlet. I had issues before w/ write permissions to local disk, but now I use volumes instead, so quadlet is working for me now, and therefore no need to manage podman-compose anymore

divadpoc
  • 121