2022-09-26 23:10:48 +02:00
|
|
|
[Unit]
|
2023-07-17 22:31:05 +02:00
|
|
|
Description=Podman container-{{ services_service_name }}-nginx.service
|
2022-09-26 23:10:48 +02:00
|
|
|
Documentation=man:podman-generate-systemd(1)
|
|
|
|
Wants=network.target
|
|
|
|
After=network-online.target
|
2023-07-17 22:31:05 +02:00
|
|
|
BindsTo=pod-{{ services_service_name }}.service
|
|
|
|
After=pod-{{ services_service_name }}.service
|
2022-10-30 22:09:01 +01:00
|
|
|
OnFailure=status-mail@%n.service
|
2022-09-26 23:10:48 +02:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
|
|
Restart=on-failure
|
|
|
|
TimeoutStopSec=70
|
2023-07-17 22:31:05 +02:00
|
|
|
ExecStartPre=/bin/rm -f %t/container-{{ services_service_name }}-nginx.pid %t/container-{{ services_service_name }}-nginx.ctr-id
|
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 }}-nginx.pid \
|
|
|
|
--cidfile %t/container-{{ services_service_name }}-nginx.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 \
|
|
|
|
--label "io.containers.autoupdate=image" \
|
|
|
|
-dt \
|
2022-12-16 21:49:50 +01:00
|
|
|
{{ services_rproxy_nginx_add_hosts }} \
|
2023-07-23 00:37:19 +02:00
|
|
|
-v {{ system_etc_root_directory }}/resolv.conf:/etc/resolv.conf:ro \
|
2023-07-18 23:18:00 +02:00
|
|
|
-v ./.config/service/nginx.conf:/etc/nginx/nginx.conf:ro \
|
|
|
|
-v ./.config/service/stream.conf:/etc/nginx/stream.conf:ro \
|
|
|
|
-v ./.config/service/nginx-conf.d:/etc/nginx/conf.d:ro \
|
|
|
|
-v ./.config/service/dhparam.pem:/etc/ssl/certs/dhparam.pem:ro \
|
|
|
|
-v {{ services_data_directory }}/{{ services_service_user_name }}/etc-letsencrypt/_data:/etc/letsencrypt:ro \
|
2022-11-02 19:36:59 +01:00
|
|
|
-v var-lib-letsencrypt:/var/lib/letsencrypt:ro \
|
|
|
|
-v var-www-html:/var/www/html \
|
2023-07-17 22:31:05 +02:00
|
|
|
--name=pod-{{ services_service_name }}-nginx \
|
2023-07-17 23:03:33 +02:00
|
|
|
docker.io/library/nginx:{{ services_service_deploy_versions.nginx }}
|
2023-07-17 22:31:05 +02:00
|
|
|
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/container-{{ services_service_name }}-nginx.ctr-id -t 10
|
|
|
|
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/container-{{ services_service_name }}-nginx.ctr-id
|
|
|
|
PIDFile=%t/container-{{ services_service_name }}-nginx.pid
|
2022-09-26 23:10:48 +02:00
|
|
|
Type=forking
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target default.target
|