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

31 lines
1.2 KiB
Desktop File

[Unit]
Description=Podman container-cloud-chown.service
Documentation=man:podman-generate-systemd(1)
After=pod-cloud.service
Before=container-cloud-nextcloud.service container-cloud-cron.service
OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/container-cloud-chown.pid %t/container-cloud-chown.ctr-id
ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/container-cloud-chown.pid \
--cidfile %t/container-cloud-chown.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-cloud.pod-id \
--replace \
-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 \
--user=0 \
--entrypoint="/bin/bash" \
--name=pod-cloud-chown \
docker.io/library/nextcloud:{{ services_service_deploy_versions.nextcloud }} \
-c "chown -R www-data:www-data /var/www/html /media/external"
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-cloud-chown.ctr-id
Type=oneshot
[Install]
WantedBy=container-cloud-nextcloud.service container-cloud-cron.service