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

37 lines
1.4 KiB
SYSTEMD
Raw Normal View History

2022-11-03 00:25:43 +01:00
[Unit]
Description=Podman container-cloud-nginx.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
BindsTo=pod-cloud.service
2023-08-18 13:07:16 +02:00
After=pod-cloud.service container-cloud-nextcloud.service
2022-11-03 00:25:43 +01:00
OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/container-cloud-nginx.pid %t/container-cloud-nginx.ctr-id
ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/container-cloud-nginx.pid \
--cidfile %t/container-cloud-nginx.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-cloud.pod-id \
--replace \
--label "io.containers.autoupdate=image" \
--log-driver=journald \
-dt \
-v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \
-v ./.config/service/nginx.conf:/etc/nginx/nginx.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 \
--name=pod-cloud-nginx \
docker.io/library/nginx:{{ services_service_deploy_versions.nginx }}
2022-11-03 00:25:43 +01:00
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-cloud-nginx.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-cloud-nginx.ctr-id
PIDFile=%t/container-cloud-nginx.pid
Type=forking
[Install]
WantedBy=multi-user.target default.target