forked from firecat53/dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plex.service
36 lines (34 loc) · 853 Bytes
/
plex.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[Unit]
Description=Plex container
After=docker.service
Requires=docker.service
[Service]
Restart=always
RestartSec=10
ExecStartPre=-/usr/bin/docker rm plex_run
ExecStart=/usr/bin/docker run \
--device /dev/dri:/dev/dri \
--mount type=volume,source=plex_config,target=/config \
-v /mnt/downloads:/data \
-v /mnt/media:/mnt/media \
-p 32400:32400/tcp \
-p 3005:3005/tcp \
-p 8324:8324/tcp \
-p 32469:32469/tcp \
-p 1900:1900/udp \
-p 32410:32410/udp \
-p 32412:32412/udp \
-p 32413:32413/udp \
-p 32414:32414/udp \
-e TZ="America/Los_Angeles" \
-e PLEX_CLAIM={{ plex_claim_token }} \
-e PLEX_UID={{ userid }} \
-e PLEX_GID={{ groupid }} \
-e ADVERTISE_IP="http://192.168.0.101:32400/" \
-e ALLOWED_NETWORKS=192.168.0.0/24 \
-h myhostname \
--name plex_run \
plexinc/pms-docker
ExecStop=/usr/bin/docker stop plex_run
[Install]
WantedBy=multi-user.target