ansible-edda/plays/services/roles/deploy/notes/templates/systemd/container-notes-chown.service.j2

29 lines
1.2 KiB
Django/Jinja

[Unit]
Description=Podman container-notes-chown.service
Documentation=man:podman-generate-systemd(1)
After=pod-notes.service
Before=container-notes-joplin.service
OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/container-notes-chown.pid %t/container-notes-chown.ctr-id
ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/container-notes-chown.pid \
--cidfile %t/container-notes-chown.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-notes.pod-id \
--replace \
-v {{ services_data_directory }}/pod-notes/data/_data:/data \
--user=0 \
--entrypoint="/bin/bash" \
--name=pod-notes-chown \
docker.io/joplin/server:{{ services_deploy_versions.notes.joplin }} \
-c "chown joplin:joplin /data"
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-notes-chown.ctr-id
Type=oneshot
[Install]
WantedBy=container-notes-joplin.service