home-pods/container-gitea-postgres.se...

29 lines
805 B
SYSTEMD

[Unit]
Description=Podman container-gitea-postgres.service
Wants=network-online.target
After=network-online.target
RequiresMountsFor=%t/containers
BindsTo=pod-gitea.service
After=pod-gitea.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/%n.ctr-id
ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm \
--pod-id-file %t/pod-gitea.pod-id \
--sdnotify=conmon --replace -d \
--name=gitea-postgres \
-v gitea-postgres:/var/lib/postgresql/data:Z \
--label "io.containers.autoupdate=registry" \
docker.io/postgres:11
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
Type=notify
NotifyAccess=all
[Install]
WantedBy=default.target