ansible-edda/playbooks/roles/services/deploy/lrproxy/templates/systemd/container-lrproxy-certbot.service

25 lines
1.2 KiB
SYSTEMD
Raw Normal View History

2023-07-09 22:02:51 +02:00
[Unit]
Description=Podman container-lrproxy-certbot.service
Documentation=man:podman-generate-systemd(1)
OnFailure=status-mail@%n.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/container-lrproxy-certbot.pid %t/container-lrproxy-certbot.ctr-id
ExecStartPre=/usr/bin/podman pull docker.io/certbot/certbot
ExecStart=/usr/bin/podman run \
--conmon-pidfile %t/container-lrproxy-certbot.pid \
--cidfile %t/container-lrproxy-certbot.ctr-id \
--cgroups=no-conmon \
--pod-id-file %t/pod-lrproxy.pod-id \
--replace \
-v /etc/resolv.conf:/etc/resolv.conf:ro \
-v {{ services_data_directory }}/pod-lrproxy/etc-letsencrypt/_data:/etc/letsencrypt \
-v var-lib-letsencrypt:/var/lib/letsencrypt \
-v var-www-html:/var/www/html \
--name=pod-lrproxy-certbot \
docker.io/certbot/certbot --non-interactive renew
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-lrproxy-certbot.ctr-id
Type=oneshot