servarr-stack – Rev 2
?pathlinks?
[Unit]
Description=Readarr
After=docker.service prowlarr.service rtorrent.service gotify.service
Requires=docker.service
StartLimitIntervalSec=0
Wants=prowlarr.service rtorrent.service gotify.service
[Service]
Slice=servarr.slice
Restart=always
RestartSec=5s
ExecStartPre=/bin/sh -c '/usr/bin/docker network create entertainment || true'
ExecStartPre=/usr/bin/docker pull localhost:5000/readarr:latest
ExecStart=/usr/bin/docker run --name=readarr \
--rm \
--hostname readarr \
--net=entertainment \
--interactive \
--user 0:0 \
--health-cmd 'curl -f http://localhost:8787/readarr/api/v1/health?apikey=API_KEY || exit 1' \
--health-interval 1m \
--health-retries 3 \
--health-timeout 10s \
--health-start-period 60s \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-p 8787:8787 \
-v /mnt/swarm/docker/data/readarr:/config \
-v /mnt/archie/Books:/books \
-v /mnt/swarm/downloads/:/downloads \
localhost:5000/readarr:latest
ExecStop=/usr/bin/docker stop readarr
ExecStop=/usr/bin/docker rm -f readarr
TimeoutSec=300
Environment=DOCKER_CONFIG=/etc/docker
[Install]
WantedBy=multi-user.target