Moved commands to docker-compose and created base directories for each service
This commit is contained in:
parent
859d1e7920
commit
9f78abfd9d
12 changed files with 130 additions and 0 deletions
27
plex/docker-compose.yml
Normal file
27
plex/docker-compose.yml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
version: "2.1"
|
||||
services:
|
||||
plex:
|
||||
image: plexinc/pms-docker:latest
|
||||
container_name: plex
|
||||
network_mode: host
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/Los_Angeles
|
||||
- VERSION=docker
|
||||
- PLEX_CLAIM=claim-Gh-Gk8R11eNyq7kg4Jxx
|
||||
volumes:
|
||||
- ${PLEX_HOME}/config:/config
|
||||
- ${PLEX_HOME}/transcode:/transcode
|
||||
- ${PLEX_HOME}/data:/data
|
||||
ports:
|
||||
- 32400:32400
|
||||
- 3005:3005
|
||||
- 8324:8324
|
||||
- 32469:32469
|
||||
- 1900:1900
|
||||
- 32410:32410
|
||||
- 32412:32412
|
||||
- 32413:32413
|
||||
- 32414:32414
|
||||
restart: unless-stopped
|
||||
30
plex/plex_install.sh
Normal file
30
plex/plex_install.sh
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Define admin user account
|
||||
if [ -z "$ADMIN_ACCOUNT"]
|
||||
then
|
||||
ADMIN_ACCOUNT=root
|
||||
fi
|
||||
su - ${ADMIN_ACCOUNT}
|
||||
|
||||
## Define bulk storage location
|
||||
if [ -z "$ZFS_DIR" ]
|
||||
then
|
||||
ZFS_DIR=/data
|
||||
fi
|
||||
|
||||
echo "Installing Plex ..."
|
||||
PLEX_HOME=${ZFS_DIR}/plex
|
||||
|
||||
sudo docker run --detach \
|
||||
--name plex \
|
||||
--network=host \
|
||||
--env TZ="America/Los_Angles" \
|
||||
--env PLEX_CLAIM="claim-Gh-Gk8R11eNyq7kg4Jxx" \
|
||||
--volume ${PLEX_HOME}/config:/config \
|
||||
--volume ${PLEX_HOME}/transcode:/transcode \
|
||||
--volume ${PLEX_HOME}/data:/data \
|
||||
--restart unless-stopped \
|
||||
plexinc/pms-docker
|
||||
|
||||
echo "Successfully installed Plex"
|
||||
Loading…
Add table
Add a link
Reference in a new issue