sample systemd service
This commit is contained in:
parent
0c1f4f6c33
commit
52757828e5
26
seafile.service
Normal file
26
seafile.service
Normal file
@ -0,0 +1,26 @@
|
||||
[Unit]
|
||||
Description=Seafile container https://git.shimun.net/shimun/docker-seafile
|
||||
|
||||
[Service]
|
||||
Slice=machine.slice
|
||||
# Resource limits
|
||||
Delegate=true
|
||||
CPUShares=256
|
||||
MemoryLimit=512M
|
||||
|
||||
Environment=ROOT_DIR=/srv/seafile
|
||||
|
||||
#Run first once to setup
|
||||
#rkt --insecure-options=image run --dns 8.8.8.8 --volume volume-opt-seafile,kind=host,source=${ROOT_DIR} docker://repo.shimun.net/shimun/seafile --interactive
|
||||
|
||||
ExecStartPre=/bin/mkdir -p ${ROOT_DIR}
|
||||
ExecStart=/usr/bin/rkt --insecure-options=image run --dns 8.8.8.8 --volume volume-opt-seafile,kind=host,source=${ROOT_DIR} --port 80-tcp:8080 \
|
||||
docker://repo.shimun.net/shimun/seafile
|
||||
|
||||
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