|
|
|
|
|
by lolinder
883 days ago
|
|
I already was defining my infrastructure with docker-compose.yml files, and found out that podman-compose has a poorly documented feature that generates systemd units. It doesn't use the now-deprecated podman feature, it writes the unit files itself, and I find the process much smoother than the podman feature anyway. To enable the feature: $ podman-compose systemd -a create-unit
To register a systemd unit: $ podman-compose systemd -a register
$ systemctl --user enable --now "podman-compose@$PROJECT_NAME"
Updating looks like this: $ podman-compose pull
$ systemctl --user restart "podman-compose@$PROJECT_NAME"
($PROJECT_NAME is usually the directory name.)Source code for the feature is here if you care to inspect it: https://github.com/containers/podman-compose/blob/f6dbce3618... Admittedly, I'm still on podman 4.3.1, but I don't see any reason why this would stop working in later versions of podman. |
|