added systemd service file
This commit is contained in:
parent
8e72c29759
commit
976be2b62c
26
sauerbraten.service
Normal file
26
sauerbraten.service
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Sauerbraten Server container based on https://github.com/andrius4669/zeromod-sauerbraten
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Slice=machine.slice
|
||||||
|
# Resource limits
|
||||||
|
Delegate=true
|
||||||
|
CPUShares=256
|
||||||
|
MemoryLimit=128M
|
||||||
|
|
||||||
|
Environment=ROOT_DIR=/srv/sauerbraten
|
||||||
|
Environment=SAUER_PORT=4700
|
||||||
|
Environment=SAUER_CMD="-d1 -c18 -g2"
|
||||||
|
|
||||||
|
ExecStartPre=/bin/mkdir -p ${ROOT_DIR}
|
||||||
|
ExecStart=/usr/bin/rkt --insecure-options=image run --dns 8.8.8.8 --inherit-env --volume volume-opt-sauerbraten,kind=host,source=${ROOT_DIR} \
|
||||||
|
--port 28785-udp:${SAUER_PORT}5 --port 28786-udp:${SAUER_PORT}6 --port 28785-tcp:${SAUER_PORT}5 --port 28786-tcp:${SAUER_PORT}6 \
|
||||||
|
docker://repo.shimun.net/sauerbraten -- ${SAUER_CMD} --- --memory=64M
|
||||||
|
|
||||||
|
ExecStopPost=/usr/bin/rkt gc
|
||||||
|
KillMode=mixed
|
||||||
|
Restart=always
|
||||||
|
RestartSec=30
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user