-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Plex Docker setup with organized media structure (#119)
- Loading branch information
Showing
3 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
services: | ||
plex: | ||
container_name: plex | ||
image: plexinc/pms-docker | ||
network_mode: host # Using host network for optimal performance | ||
environment: | ||
- TZ=${TIMEZONE:-$(timedatectl | grep "Time zone" | awk '{print $3}')} # Use system timezone | ||
- PLEX_CLAIM=claim-_C16H5qQ6qhHnubew_Yx | ||
volumes: | ||
- /opt/plex/config:/config | ||
- /opt/plex/transcode:/transcode | ||
- /opt/plex/media:/data | ||
- /mnt/organized/tvseries:/mnt/organized/tvseries | ||
- /mnt/organized/movies:/mnt/organized/movies | ||
- /mnt/zurg/tvseries:/mnt/zurg/tvseries | ||
- /mnt/zurg/movies:/mnt/zurg/movies | ||
restart: unless-stopped | ||
|
||
# Note: Before running, ensure directories exist and have correct permissions: | ||
# sudo mkdir -p /opt/plex/{config,transcode,media} | ||
# sudo chown -R $USER:$USER /opt/plex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Create necessary directories if they don't exist | ||
sudo mkdir -p /opt/plex/config | ||
sudo mkdir -p /opt/plex/transcode | ||
sudo mkdir -p /opt/plex/media | ||
|
||
# Set permissions | ||
sudo chown -R $USER:$USER /opt/plex | ||
|
||
# Get timezone from system | ||
TIMEZONE=$(timedatectl | grep "Time zone" | awk '{print $3}') | ||
|
||
# Run Plex Media Server | ||
docker run \ | ||
-d \ | ||
--name plex \ | ||
--network=host \ | ||
-e TZ="$TIMEZONE" \ | ||
-e PLEX_CLAIM="claim-_C16H5qQ6qhHnubew_Yx" \ | ||
-v /opt/plex/config:/config \ | ||
-v /opt/plex/transcode:/transcode \ | ||
-v /opt/plex/media:/data \ | ||
--restart unless-stopped \ | ||
plexinc/pms-docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# Create necessary directories | ||
sudo mkdir -p /opt/plex/{config,transcode,media} | ||
sudo mkdir -p /mnt/organized/{tvseries,movies} | ||
sudo mkdir -p /mnt/zurg/{tvseries,movies} | ||
|
||
# Set permissions | ||
sudo chown -R $USER:$USER /opt/plex | ||
sudo chown -R $USER:$USER /mnt/organized | ||
sudo chown -R $USER:$USER /mnt/zurg | ||
# Export timezone for docker-compose | ||
export TIMEZONE=$(timedatectl | grep "Time zone" | awk '{print $3}') | ||
|
||
echo "Setup complete! You can now run: docker-compose up -d" |