podman-compose icon indicating copy to clipboard operation
podman-compose copied to clipboard

FR: Automated systemd service creation

Open UebelAndre opened this issue 3 years ago • 7 comments

One of the things that I find unnecessarily cumbersome about the lack of a daemon from podman is that users have to create services for each pod themselves. Would it be possible/sensible to add a helper command to podman-compose for installing a service that runs as the user who executed the command? This would solve for situations where users generate service files differently for each use case leading to inconsistent behavior and various unintentional bugs. An automated way to setup a service to restart a pod and it's containers on a reboot would greatly help.

UebelAndre avatar Dec 03 '20 16:12 UebelAndre

I actually think this should be fixed in Podman, basically drop a unit file that runs only one time at boot, With something like podman start --restart that searches through all of the containers that have restart enabled, and then start them.

@mheon WDYT?

rhatdan avatar Dec 07 '20 18:12 rhatdan

I might do a podman system command here that wraps around podman start instead (I dislike adding really-specific options to common commands) but the general approach is a thumbs-up from me.

mheon avatar Dec 07 '20 18:12 mheon

Any estimates for a timeline for this? I'm not super up to date with the on-goings of podman-compose 😅

UebelAndre avatar Dec 07 '20 21:12 UebelAndre

This would be done in a different project, and then podman-compose could take advantage.

@mheon podman system boot or something similar would be fine with me.

rhatdan avatar Dec 07 '20 22:12 rhatdan

@rhatdan Is there an issue or PR in that other project I could track?

UebelAndre avatar Dec 15 '20 15:12 UebelAndre

It would be best to open an issue in Podman and then monitor it from there.

rhatdan avatar Dec 15 '20 19:12 rhatdan

I created https://github.com/containers/podman/issues/8779

It was unclear to me that I needed to do this given the conversation earlier in this ticket. I'll keep this ticket open until either this feature is implemented or the upstream issue is done in such a way that this request is no longer needed.

UebelAndre avatar Dec 18 '20 17:12 UebelAndre