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

25 lines
1.4 KiB
SYSTEMD
Raw Normal View History

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