Updated to 1.3.1-dev.2
#
# This systemd unit starts a webserver instance using Podman.
# Most parts of this file come from podman-generate-systemd.
#
[Unit]
Description=Podman webserver.service
Requires=nginx.service
Before=nginx.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=-%S/state/environment
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/webserver.pid %t/webserver.pod-id
ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/webserver.pid \
--pod-id-file %t/webserver.pod-id \
--name webserver \
--publish 127.0.0.1:${NGINX_TCP_PORT}:80 \
--publish ${SFTP_TCP_PORT}:2022 \
--publish 127.0.0.1:${SFTPGO_TCP_PORT}:8080 \
--replace \
--network=slirp4netns:allow_host_loopback=true
ExecStart=/usr/bin/podman pod start --pod-id-file %t/webserver.pod-id
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/webserver.pod-id -t 10
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/webserver.pod-id
PIDFile=%t/webserver.pid
Type=forking
[Install]
WantedBy=default.target