home-pods/container-nginx-web.service

29 lines
898 B
SYSTEMD
Raw Normal View History

2022-07-02 15:04:51 +02:00
[Unit]
Description=Podman container-nginx-web.service
Wants=network-online.target
After=network-online.target
Requires=container-php-fpm.service
After=container-php-fpm.service
BindsTo=pod-web.service
After=pod-web.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/%n.ctr-id
ExecStart=/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --sdnotify=conmon --replace -d \
--name=nginx-web \
--pod-id-file %t/pod-web.pod-id \
-v nginx-web:/var/www/html:z \
-v /var/lib/containers/storage/volumes/nginx-web-config/_data/nginx.conf:/etc/nginx/nginx.conf:Z \
--label "io.containers.autoupdate=registry" \
docker.io/nginx
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
Type=notify
NotifyAccess=all
[Install]
WantedBy=default.target