ansible-edda/playbooks/roles/services/deploy/cloud/templates/systemd/container-cloud-cron.service.j2

37 lines
1.6 KiB
Plaintext
Raw Normal View History

2022-11-03 00:25:43 +01:00
[Unit]
Description=Podman container-cloud-cron.service
Documentation=man:podman-generate-systemd(1)
2022-11-03 22:02:47 +01:00
Wants=network.target
After=network-online.target
BindsTo=pod-cloud.service
After=pod-cloud.service
2022-11-03 00:25:43 +01:00
OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
2022-11-03 22:02:47 +01:00
Restart=on-failure
2022-11-03 00:25:43 +01:00
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/container-cloud-cron.pid %t/container-cloud-cron.ctr-id
ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/container-cloud-cron.pid \
--cidfile %t/container-cloud-cron.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-cloud.pod-id \
--replace \
2022-11-03 22:02:47 +01:00
--label "io.containers.autoupdate=image" \
-dt \
2022-12-16 23:57:38 +01:00
--add-host=pod-database:{{ services_all_services['database'].address }} \
2022-12-18 00:05:58 +01:00
-v {{ services_root_directory }}/valkyrie-resolv.conf:/etc/resolv.conf:ro \
-v {{ services_data_directory }}/pod-cloud/nextcloud/_data:/var/www/html \
-v {{ services_data_directory }}/pod-cloud/data/_data:/var/www/html/data \
2022-11-03 00:25:43 +01:00
--name=pod-cloud-cron \
2022-12-16 23:57:38 +01:00
docker.io/library/nextcloud:{{ services_deploy_versions.cloud.nextcloud }} \
2022-11-03 22:02:47 +01:00
/cron.sh
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-cloud-cron.ctr-id -t 10
2022-11-03 00:25:43 +01:00
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-cloud-cron.ctr-id
2022-11-03 22:02:47 +01:00
PIDFile=%t/container-cloud-cron.pid
Type=forking
[Install]
WantedBy=multi-user.target default.target