41 lines
2.3 KiB
Desktop File
41 lines
2.3 KiB
Desktop File
[Unit]
|
|
Description=Podman container-{{ services_service_name }}-nginx.service
|
|
Documentation=man:podman-generate-systemd(1)
|
|
Wants=network.target
|
|
After=network-online.target
|
|
BindsTo=pod-{{ services_service_name }}.service
|
|
After=pod-{{ services_service_name }}.service
|
|
OnFailure=status-mail@%n.service
|
|
|
|
[Service]
|
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
Restart=on-failure
|
|
TimeoutStopSec=70
|
|
ExecStartPre=/bin/rm -f %t/container-{{ services_service_name }}-nginx.pid %t/container-{{ services_service_name }}-nginx.ctr-id
|
|
ExecStart=/usr/bin/podman run \
|
|
--conmon-pidfile %t/container-{{ services_service_name }}-nginx.pid \
|
|
--cidfile %t/container-{{ services_service_name }}-nginx.ctr-id \
|
|
--cgroups=no-conmon \
|
|
--pod-id-file %t/pod-{{ services_service_name }}.pod-id \
|
|
--replace \
|
|
--label "io.containers.autoupdate=image" \
|
|
-dt \
|
|
{{ services_rproxy_nginx_add_hosts }} \
|
|
-v {{ services_root_directory }}/{{ services_resolv_host }}-resolv.conf:/etc/resolv.conf:ro \
|
|
-v ./.config/pod-{{ services_service_name }}/nginx.conf:/etc/nginx/nginx.conf:ro \
|
|
-v ./.config/pod-{{ services_service_name }}/stream.conf:/etc/nginx/stream.conf:ro \
|
|
-v ./.config/pod-{{ services_service_name }}/nginx-conf.d:/etc/nginx/conf.d:ro \
|
|
-v ./.config/pod-{{ services_service_name }}/dhparam.pem:/etc/ssl/certs/dhparam.pem:ro \
|
|
-v {{ services_data_directory }}/pod-{{ services_service_name }}/etc-letsencrypt/_data:/etc/letsencrypt:ro \
|
|
-v var-lib-letsencrypt:/var/lib/letsencrypt:ro \
|
|
-v var-www-html:/var/www/html \
|
|
--name=pod-{{ services_service_name }}-nginx \
|
|
docker.io/library/nginx:{{ services_deploy_versions.www.nginx }}
|
|
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
|
|
Type=forking
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target default.target
|