30 lines
1009 B
Desktop File
30 lines
1009 B
Desktop File
[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
|
|
Environment=SEAF_MYSQL="" #Empty = Sqlite
|
|
Environment=SEAF_URL="https://seaf.example.com"
|
|
Environment=SEAF_UPGRADE_INTERVAL=10
|
|
|
|
#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 --environment=SEAF_URL="https://seaf.example.com" --interactive
|
|
|
|
ExecStartPre=/bin/mkdir -p ${ROOT_DIR}
|
|
ExecStart=/usr/bin/rkt --insecure-options=image run --dns 8.8.8.8 --inherit-env --volume volume-opt-seafile,kind=host,source=${ROOT_DIR} --port 80-tcp:8080 \
|
|
docker://repo.shimun.net/shimun/seafile --environment=SEAF_UPGRADE_INTERVAL=${SEAF_UPGRADE_INTERVAL}
|
|
|
|
ExecStopPost=/usr/bin/rkt gc
|
|
KillMode=mixed
|
|
Restart=always
|
|
RestartSec=30
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|