Skip to content

Instantly share code, notes, and snippets.

@coltenkrauter
Last active January 3, 2023 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coltenkrauter/0ed9f24e19e526d1c1ed040864b118fe to your computer and use it in GitHub Desktop.
Save coltenkrauter/0ed9f24e19e526d1c1ed040864b118fe to your computer and use it in GitHub Desktop.
Docker compose file for setting up Plex
# docker-compose-plex.yml or docker-compose.yml
# https://github.com/linuxserver/docker-plex
# Before running 'docker-compose up -d', ensure that all directories exist and bash variables are set
# Here is an example of how you could create the dirs and set the vars needed in this file:
# BOOTSTRAP_PLEX_CLAIM= # Fill this with the code found here: https://www.plex.tv/claim/
# BOOTSTRAP_PLEX_TV=
# BOOTSTRAP_PLEX_MOVIES=
# BOOTSTRAP_PLEX_MUSIC=
# echo "export BOOTSTRAP_PLEX_CLAIM=$BOOTSTRAP_PLEX_CLAIM" >> $HOME/.bashrc
# echo "export BOOTSTRAP_PLEX_TV=$BOOTSTRAP_PLEX_TV" >> $HOME/.bashrc
# echo "export BOOTSTRAP_PLEX_MOVIES=$BOOTSTRAP_PLEX_MOVIES" >> $HOME/.bashrc
# echo "export BOOTSTRAP_PLEX_MUSIC=$BOOTSTRAP_PLEX_MUSIC" >> $HOME/.bashrc
# mkdir -p $HOME/plex/library
version: '3.7'
services:
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
network_mode: host
environment:
PUID: '1000'
PGID: '1000'
VERSION: docker
#- PLEX_CLAIM==$BOOTSTRAP_PLEX_CLAIM
volumes:
- $HOME/plex/library:/config
- $BOOTSTRAP_PLEX_TV:/tv
- $BOOTSTRAP_PLEX_MOVIES:/movies
- $BOOTSTRAP_PLEX_MUSIC:/music
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment