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

35 lines
1.4 KiB
Plaintext
Raw Normal View History

[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
2022-11-02 19:50:45 +01:00
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 /etc/resolv.conf:/etc/resolv.conf:ro \
-v ./.config/pod-www/wojciechkozlowski.eu/public:/usr/share/nginx/html:ro \
--name=pod-www-nginx \
2022-11-14 21:03:34 +01:00
docker.io/library/nginx:stable
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