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

41 lines
2.0 KiB
Desktop File

[Unit]
Description=Podman container-cloud-cron.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
BindsTo=pod-cloud.service
Requires=container-cloud-chown.service
After=pod-cloud.service container-cloud-chown.service
OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
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 \
--label "io.containers.autoupdate=image" \
--log-driver=journald \
-dt \
--add-host=pod-database:{{ services_all_services['database'].inet_address }} \
--add-host=pod-database:{{ services_all_services['database'].inet6_address }} \
-v {{ system_etc_root_directory }}/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 \
-v {{ services_data_directory }}/pod-cloud/external/_data:/media/external \
--name=pod-cloud-cron \
docker.io/library/nextcloud:{{ services_service_deploy_versions.nextcloud }} \
/cron.sh
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-cloud-cron.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-cloud-cron.ctr-id
PIDFile=%t/container-cloud-cron.pid
Type=forking
[Install]
WantedBy=multi-user.target default.target