scripts/lech/docker/plex.sh

41 lines
1010 B
Bash
Raw Normal View History

2023-09-05 11:40:31 -04:00
#!/bin/bash
set -e
up () {
# Exposed on port 32400 in pew-net
docker run \
--detach \
--name plex \
--restart unless-stopped \
2023-09-07 21:08:48 -04:00
--runtime nvidia \
2023-09-05 11:40:31 -04:00
--env PUID=1000 \
--env PGID=1000 \
2024-06-01 08:52:01 -04:00
--env PLEX_CLAIM=claim-k6mB7nUo_Ts8rnotGAQR \
2023-09-07 21:08:48 -04:00
--env NVIDIA_VISIBLE_DEVICES=all \
--env VERSION=docker \
2023-09-05 11:40:31 -04:00
--volume /mammoth/plex/config:/config:rw \
2023-10-29 18:12:35 -04:00
--volume /mammoth/media/homemedia:/media/homemedia:ro \
2023-09-05 11:40:31 -04:00
--volume /mammoth/media/audiobooks:/media/audiobooks:ro \
--volume /mammoth/media/movies:/media/movies:ro \
--volume /mammoth/media/music:/media/music:ro \
--volume /mammoth/media/radio:/media/radio:ro \
--volume /mammoth/media/tv:/media/tv:ro \
--volume /media-vtluug:/media/media-vtluug:ro \
--volume /mammoth/tmp/plex/transcode:/transcode:rw \
2023-09-07 21:08:48 -04:00
--publish 32400:32400 \
2023-09-05 11:40:31 -04:00
--network pew-net \
ghcr.io/linuxserver/plex:latest
}
down () {
docker stop plex || true
docker rm plex || true
}
logs () {
docker logs --follow plex
}
$@