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

35 lines
1.1 KiB
SYSTEMD
Raw Normal View History

[Unit]
2023-11-11 15:01:29 +01:00
Description=Podman pod-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
2023-11-11 15:01:29 +01:00
ExecStartPre=/bin/rm -f %t/pod-www-nginx.pid %t/pod-www-nginx.ctr-id
2022-11-02 19:50:45 +01:00
ExecStart=/usr/bin/podman run \
2023-11-11 15:01:29 +01:00
--conmon-pidfile %t/pod-www-nginx.pid \
--cidfile %t/pod-www-nginx.ctr-id \
2023-10-01 19:08:06 +02:00
--cgroups=no-conmon \
--pod-id-file %t/pod-www.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/wojciechkozlowski.eu/public:/usr/share/nginx/html:ro \
--name=pod-www-nginx \
docker.io/library/nginx:{{ services_service_deploy_versions.nginx }}
2023-11-11 15:01:29 +01:00
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/pod-www-nginx.ctr-id -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/pod-www-nginx.ctr-id
PIDFile=%t/pod-www-nginx.pid
Type=forking
[Install]
WantedBy=multi-user.target default.target