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

35 lines
1.4 KiB
Desktop File

[Unit]
Description=Podman container-www-nginx.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
BindsTo=pod-www.service
After=pod-www.service
OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/container-www-nginx.pid %t/container-www-nginx.ctr-id
ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/container-www-nginx.pid \
--cidfile %t/container-www-nginx.ctr-id \
--cgroups=no-conmon \
--pod-id-file \
%t/pod-www.pod-id \
--replace \
--label "io.containers.autoupdate=image" \
-dt \
-v {{ services_root_directory }}/{{ services_resolv_host }}-resolv.conf:/etc/resolv.conf:ro \
-v ./.config/service/wojciechkozlowski.eu/public:/usr/share/nginx/html:ro \
--name=pod-www-nginx \
docker.io/library/nginx:{{ services_service_deploy_versions.nginx }}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-www-nginx.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-www-nginx.ctr-id
PIDFile=%t/container-www-nginx.pid
Type=forking
[Install]
WantedBy=multi-user.target default.target