add systemd unit for rootless podman container
This commit is contained in:
36
ppf.container.service
Normal file
36
ppf.container.service
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=PPF Proxy Validator Container
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=30
|
||||||
|
TimeoutStartSec=90
|
||||||
|
TimeoutStopSec=30
|
||||||
|
|
||||||
|
# Container runtime
|
||||||
|
ExecStartPre=-/usr/bin/podman stop -t 10 ppf
|
||||||
|
ExecStartPre=-/usr/bin/podman rm -f ppf
|
||||||
|
ExecStart=/usr/bin/podman run \
|
||||||
|
--name ppf \
|
||||||
|
--rm \
|
||||||
|
--log-driver=journald \
|
||||||
|
--network=slirp4netns:allow_host_loopback=true \
|
||||||
|
-v %h/ppf/config.ini:/app/config.ini:ro,Z \
|
||||||
|
-v %h/ppf/servers.txt:/app/servers.txt:ro,Z \
|
||||||
|
-v %h/ppf/data:/app/data:Z \
|
||||||
|
-e PYTHONUNBUFFERED=1 \
|
||||||
|
localhost/ppf:latest \
|
||||||
|
python proxywatchd.py
|
||||||
|
|
||||||
|
ExecStop=/usr/bin/podman stop -t 10 ppf
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
SyslogIdentifier=ppf
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
Reference in New Issue
Block a user