2021-05-16 21:41:38 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
up () {
|
2022-12-23 19:30:06 -05:00
|
|
|
# Ensure iptables rules exist
|
|
|
|
# https://askubuntu.com/questions/1052919/iptables-reload-restart-on-ubuntu/1072948#1072948
|
|
|
|
docker network create --ipv6 --subnet "fd01::/80" pew-net || true
|
2021-05-16 21:41:38 -04:00
|
|
|
|
|
|
|
# Exposed on port 32400 in pew-net
|
|
|
|
docker run \
|
|
|
|
--detach \
|
|
|
|
--name plex \
|
|
|
|
--restart unless-stopped \
|
|
|
|
--env PUID=1000 \
|
|
|
|
--env PGID=1000 \
|
|
|
|
--env VERSION=docker \
|
|
|
|
--volume /bigdata/k8s-config/plex/config:/config:rw \
|
|
|
|
--volume /bigdata/media/movies:/media/movies:ro \
|
2022-09-25 10:18:12 -04:00
|
|
|
--volume /bigdata/media/audiobooks:/media/audiobooks:ro \
|
2021-05-16 21:41:38 -04:00
|
|
|
--volume /bigdata/media/music:/media/music:ro \
|
|
|
|
--volume /media-vtluug:/media/media-vtluug:ro \
|
|
|
|
--network pew-net \
|
2022-02-26 12:14:35 -05:00
|
|
|
ghcr.io/linuxserver/plex:latest
|
2021-05-16 21:41:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
down () {
|
|
|
|
docker stop plex || true
|
|
|
|
docker rm plex || true
|
|
|
|
}
|
|
|
|
|
|
|
|
logs () {
|
|
|
|
docker logs --follow plex
|
|
|
|
}
|
|
|
|
|
|
|
|
$@
|