2024-10-16 21:03:23 +02:00
|
|
|
[Unit]
|
|
|
|
|
Description=Podman Compose based service
|
|
|
|
|
After=network.target
|
2026-05-27 00:29:22 +02:00
|
|
|
PartOf={{ mainunit }}
|
2024-10-16 21:03:23 +02:00
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=exec
|
|
|
|
|
# If started incorrectly: stop it first (ie when started without systemd, systemd will know something is started
|
|
|
|
|
# and will not do anything when start is called on a unit that already is running)
|
|
|
|
|
ExecStartPre=-/usr/bin/podman-compose -f {{ homedir }}/compose.yml down
|
|
|
|
|
ExecStart=/usr/bin/podman-compose -f {{ homedir }}/compose.yml up
|
|
|
|
|
ExecStop=/usr/bin/podman-compose -f {{ homedir }}/compose.yml down
|
|
|
|
|
Restart=always
|
|
|
|
|
WorkingDirectory={{ homedir }}
|
|
|
|
|
|
|
|
|
|
[Install]
|
2026-05-27 00:29:22 +02:00
|
|
|
WantedBy={{ mainunit }}
|