homelab-ultimate-setup/docker-compose.yml
2024-02-16 21:21:45 -07:00

319 lines
11 KiB
YAML

# Welcome to my Ultimate Plex Stack!
# I was hoping this could maybe help some people out when setting up their stack
#
# Environment Variable Examples:
# USER_ID = 1000
# TZ = America/Edmonton
# BASE_PATH = /home/username/docker
#
# https://trash-guides.info/Hardlinks/Hardlinks-and-Instant-Moves/ # This can be useful for establishing how the media will be presented below
# UNRAID_SHARE = /mnt/media # This can also be renamed to "SHARE" or "MEDIA" this is where you will present your media
#
# NOTE: This is not a plug and play solution, some research / customization will be required to make this work as intented
# Feel free to customize ie: remove/change/add containers as needed - one size does not fit all
---
version: "2.1"
networks: #This is used if you have a reverse proxy. I use Nginx Proxy Manager but anything will do
proxy:
external:
name: proxy
services:
#Plex - used to display the media
#
#This can also be replaced by Emby/Jellyfin
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
network_mode: host
environment:
- PUID=${USER_ID}
- PGID=${USER_ID}
- TZ=${TZ}
- VERSION=docker
- PLEX_CLAIM=${PLEX_CLAIM}
ports:
- 32400:32400
devices:
- /dev/dri:/dev/dri #Required for plex HW transcoding / QuickSync
volumes:
- ${BASE_PATH}/plex/config:/config
- ${UNRAID_SHARE}/media/tv:/tv
- ${UNRAID_SHARE}/media/movies:/movies
restart: unless-stopped
#Radarr - used to find movies automatically
radarr:
image: lscr.io/linuxserver/radarr:latest
container_name: radarr
environment:
- PUID=${USER_ID}
- PGID=${USER_ID}
- TZ=${TZ}
volumes:
- ${BASE_PATH}/radarr/config:/config
- ${UNRAID_SHARE}:/share #Access to the entire share
#networks: #Does not connect to overseer if you use NPM
# - proxy
ports:
- 7878:7878
restart: unless-stopped
#Sonarr - used to find tv shows automatically
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
environment:
- PUID=${USER_ID}
- PGID=${USER_ID}
- TZ=${TZ}
volumes:
- ${BASE_PATH}/sonarr/config:/config
- ${UNRAID_SHARE}:/share #Access to the entire share
#networks: #Does not connect to overseer if you use NPM
# - proxy
ports:
- 8989:8989
restart: unless-stopped
#Prowlarr - manages your Sonarr, Radarr and download client
prowlarr:
image: lscr.io/linuxserver/prowlarr:latest
container_name: prowlarr
environment:
- PUID=${USER_ID}
- PGID=${USER_ID}
- TZ=${TZ}
volumes:
- ${BASE_PATH}/prowlarr/config:/config
#networks:
# - proxy
ports:
- 9696:9696
restart: unless-stopped
#Autobrr - used to grab torrents using the trackers IRC channel - Increases seeding due to grabbing content before RSS feed
autobrr:
container_name: autobrr
image: ghcr.io/autobrr/autobrr:latest
restart: unless-stopped
environment:
- TZ=${TZ}
- PUID=${USER_ID}
- PGID=${USER_ID}
volumes:
- ${BASE_PATH}/autobrr/config:/config
ports:
- 7474:7474
#Overseer - allows users to request media on their own
overseerr:
image: lscr.io/linuxserver/overseerr:latest
container_name: overseerr
environment:
- PUID=${USER_ID}
- PGID=${USER_ID}
- TZ=${TZ}
volumes:
- ${BASE_PATH}/overseer/config:/config
- ${UNRAID_SHARE}:/share #Access to the entire share
#networks:
# - proxy
ports:
- 5055:5055
restart: unless-stopped
#Gluetun - vpn container
gluetun: #Setup for this container will be different depending on your VPN of choice
image: qmcgaw/gluetun
container_name: gluetun
# line above must be uncommented to allow external containers to connect.
# See https://github.com/qdm12/gluetun-wiki/blob/main/setup/connect-a-container-to-gluetun.md#external-container-to-gluetun
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
ports:
- 8888:8888/tcp # HTTP proxy
- 8388:8388/tcp # Shadowsocks
- 8388:8388/udp # Shadowsocks
- 8080:8080 #Qbittorent Web UI
- 8081:8081 #Qbittorent Web UI
- 6881:6881
- 6881:6881/udp
volumes:
- ${BASE_PATH}/gluetun:/gluetun
environment:
- VPN_SERVICE_PROVIDER=${VPN_SERVICE_PROVIDER} # Example airvpn
- VPN_TYPE=wireguard #Wireguard is generally faster than OpenVPN
- WIREGUARD_PRIVATE_KEY=${WIREGUARD_PRIVATE_KEY} #Example IE4cdRxZzoy/HvlLXVLB.2Hy@d=
- WIREGUARD_PRESHARED_KEY=${WIREGUARD_PRESHARED_KEY} #Example IE4cdRxZzoy/HvlLXVLB.2Hy@d=
- WIREGUARD_ADDRESSES=${WIREGUARD_ADDRESSES} #Example 101.14.14.28/32
- SERVER_HOSTNAMES=${SERVER_HOSTNAMES} #Example vpn.airdns.org
- SERVER_NAMES=${VPN_SERVER_NAMES} #Example Dallim
- SERVER_CITIES=${VPN_SERVER_CITIES} #Example Albasserdonia
- FIREWALL_VPN_INPUT_PORTS=${FIREWALL_VPN_INPUT_PORTS} #Example 8926 - Used for port forwarding
#Qbittorent - torrenting software
#
#You can also use RuTorrent, Transmisson or Deluge
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
network_mode: "service:gluetun"
container_name: qbittorrent
labels:
- deunhealth.restart.on.unhealthy=true
environment:
- PUID=${USER_ID}
- PGID=${USER_ID}
- TZ=${TZ}
- WEBUI_PORT=8080
healthcheck: # https://github.com/qdm12/gluetun/issues/641#issuecomment-933856220
test: "curl -sf https://1.1.1.1/ || exit 1"
interval: 1m
timeout: 10s
retries: 1
volumes:
- ${BASE_PATH}/qbittorent/config:/config
- ${UNRAID_SHARE}:/share
restart: unless-stopped
#De-unhealth - used to restart qbitorrent if gluetun VPN tunnel ever drops
deunhealth:
build: .
image: qmcgaw/deunhealth
container_name: deunhealth
environment:
- LOG_LEVEL=info
- HEALTH_SERVER_ADDRESS=127.0.0.1:9999
- TZ=${TZ}
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
#Tautulli - for plex statistics. Very useful when troubleshooting performance issues
tautulli:
image: lscr.io/linuxserver/tautulli:latest
container_name: tautulli
environment:
- PUID=${USER_ID}
- PGID=${USER_ID}
- TZ=${TZ}
volumes:
- ${BASE_PATH}/tautulli:/config
networks:
- proxy
ports:
- 8181:8181
restart: unless-stopped
#Tdarr - to transcode videos from one format to another like x265 or H.265
#
#This container requires a decent amount of horse power to run but will save space in the long run
tdarr:
container_name: tdarr
image: ghcr.io/haveagitgat/tdarr:latest
restart: unless-stopped
ports:
- 8265:8265 # webUI port
- 8266:8266 # server port
environment:
- TZ=${TZ}
- PUID=${USER_ID}
- PGID=${USER_ID}
- UMASK_SET=002
- nodeName=ServerNode
- serverIP=0.0.0.0
- serverPort=8266
- webUIPort=8265
- internalNode=true
- inContainer=true
- ffmpegVersion=6
volumes:
- ${BASE_PATH}/tdarr/server:/app/server
- ${BASE_PATH}/tdarr/configs:/app/configs
- ${BASE_PATH}/tdarr/logs:/app/logs
- ${UNRAID_SHARE}:/media
- /transcode_cache:/temp
devices:
- /dev/dri:/dev/dri #Required for HW transcoding / QuickSync
#Membarr - to invite users via discord
#
#Can be configured so that when a plex member invites an outside user to a discord channel they are auto invited to plex
#
#Feel free to remove this container if you want to manually invite everyone yourself
membarr:
container_name: membarr
image: yoruio/membarr:latest
restart: unless-stopped
environment:
- token=${MEMBARR_TOKEN}
volumes:
- ${BASE_PATH}/membarr/config:/app/app/config
#Bazarr - for subtitles. Try to use SRT format if you can rather than PGS due to performance issues
bazarr:
container_name: bazarr
image: lscr.io/linuxserver/bazarr:latest
restart: unless-stopped
environment:
- PUID=${USER_ID}
- PGID=${USER_ID}
- TZ=${TZ}
volumes:
- ${BASE_PATH}/bazarr/config:/config
- ${UNRAID_SHARE}:/share
ports:
- 6767:6767
#Plex Auto Languages - This switchs languages automatically example: watching english show and non english speaks you get subtitle lol
plexautolanguages:
image: remirigal/plex-auto-languages:latest
container_name: plex-auto-languages
environment:
- PLEX_URL=${PLEX_URL} #This is your local URl example: http://192.168.1.10:32400
#To find your plex token go to https://app.plex.tv/, go to your library, click on the 3 dots on the bottom right of one of your tv/movie posters
#Then click "View XML" in the bottom right of that popup, look at the URL of the XML window and find your X-Plex-Token= in the URL (at the very end)
- PLEX_TOKEN=${PLEX_TOKEN}
- TZ=${TZ}
volumes:
- ${BASE_PATH}/pal/config:/config
#Cross Seed - used to take torrents from one tracker and seed them on another without leeching first. Increases ratio
#
#This is fairly advanced but can be removed if you don't think you will need it. Some trackers also don't allow this
cross-seed:
image: ghcr.io/cross-seed/cross-seed
container_name: cross-seed
environment:
- PUID=${USER_ID}
- PGID=${USER_ID}
ports:
- "2468:2468" # you'll need this for daemon mode only
volumes:
- ${BASE_PATH}/cross-seed/config:/config #To configure you have to manually nano the config file
- ${BASE_PATH}/qbittorent/config/qBittorrent/BT_backup:/torrents:ro # your torrent clients .torrent cache, can and should be mounted read-only (e.g. qbit: `BT_Backup` | deluge: `state` | transmission: `transmission/torrents` | rtorrent: session dir from `.rtorrent.rc`)
- ${UNRAID_SHARE}/cross-seed/current-cross-seeds:/cross-seeds # A place to temp save current cross seed .torrent files
#- ${UNRAID_SHARE}/downloads:/data # OPTIONAL!!! this is dataDir path (for data-based matching) - will need to replicate your torrent client's container path (like Arr's do)
command: daemon # this enables the search mode, change to daemon to specifically run the daemon
#Plex Meta Manager - used to create collections in plex. Example: "Most Popular Movies This Week", "Best of horror", etc.
plex-meta-manager:
image: meisnate12/plex-meta-manager
container_name: plex-meta-manager
environment:
- TZ=${TZ}
#- PMM_OVERLAYS_ONLY=true #Tells PMM to run overlays only
- PMM_CONFIG=/config/config.yml
- PMM_RUN=true #Runs PMM Immediately
#- PMM_RUN_LIBRARIES=Movies #Tells PMM to process only a library called "Movies"
volumes:
- ${BASE_PATH}/plex-meta-manager/config:/config
restart: unless-stopped