RxBrad

Example Docker Compose Plex/Oracle/Wireguard

Feb 3rd, 2023
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.04 KB | None | 0 0
  1. ---
  2. version: "2"
  3. services:
  4.   plex:
  5.     container_name: plex
  6.     image: plexinc/pms-docker
  7.     restart: unless-stopped
  8.     environment:
  9.      - TZ=America/New_York
  10.       - PLEX_CLAIM=[my claim token]
  11.     network_mode: service:wireguard
  12.     #ports:
  13.     #  - 32400:32400 #port reservation is done in the wireguard container
  14.     depends_on:
  15.      - wireguard
  16.     volumes:
  17.      - /configs/Plex:/config
  18.       - /plextranscode:/transcode
  19.       - /srv/dev-disk-by-uuid-fa4bc6a8-3afb-4939-a860-7b2859288ca3/Music:/mnt/Music
  20.       - /srv/dev-disk-by-uuid-fa4bc6a8-3afb-4939-a860-7b2859288ca3/Movies:/mnt/Movies
  21.       - /srv/dev-disk-by-uuid-fa4bc6a8-3afb-4939-a860-7b2859288ca3/TV:/mnt/TV
  22.       - /srv/dev-disk-by-uuid-fa4bc6a8-3afb-4939-a860-7b2859288ca3/Photos:/mnt/Photos
  23.       - /var/lib/docker/volumes/servarr_shield_mount/_data:/mnt/Shield
  24.     devices:
  25.       - /dev/dri:/dev/dri
  26.  
  27.   wireguard:
  28.     image: lscr.io/linuxserver/wireguard:latest
  29.     container_name: wireguard
  30.     labels:
  31.      - "com.centurylinklabs.watchtower.enable=false" #this prevents Watchtower from auto-updating Wireguard (because that breaks Plex)
  32.     cap_add:
  33.      - NET_ADMIN
  34.       - SYS_MODULE
  35.     environment:
  36.      - PUID=1000
  37.       - PGID=100
  38.       - TZ=America/New_York
  39.     ports:
  40.       - 32400:32400/tcp #Only the public Plex port is forwarded through Oracle, along with the UDP Wireguard connection port
  41.       - 3005:3005/tcp #These ports below are for local Plex discovery only, not forwarded in Oracle
  42.       - 8324:8324/tcp
  43.       - 32469:32469/tcp
  44.       - 1900:1900/udp
  45.       - 32410:32410/udp
  46.       - 32412:32412/udp
  47.       - 32413:32413/udp
  48.       - 32414:32414/udp
  49.     networks:
  50.       default:
  51.         ipv4_address: 172.18.0.50 #This IP is part of the wg-oracle 172.18.0.0/24 subnet, which was defined outside this yaml
  52.     volumes:
  53.      - /configs/Wireguard:/config
  54.       - /lib/modules:/lib/modules
  55.     sysctls:
  56.      - net.ipv4.conf.all.src_valid_mark=1
  57.     restart: unless-stopped
  58.  
  59. networks:
  60.   default:
  61.     name: wg-oracle
  62.     external: true
Advertisement
Add Comment
Please, Sign In to add comment