# Plex Media Server
# Web UI: http://<host-ip>:32400/web
# Uses Intel QuickSync for hardware transcoding (via /dev/dri)
# Media library mounted from NAS at /mnt/nas

services:
  plex:
    image: linuxserver/plex:latest
    container_name: plex
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - UMASK=022
      - VERSION=docker
      # Get claim token from: https://www.plex.tv/claim/
      - PLEX_CLAIM=claim-REDACTED_APP_PASSWORD
    volumes:
      - /home/vish/docker/plex/config:/config
      - /mnt/nas/:/data/media
    devices:
      # Intel QuickSync for hardware transcoding
      - /dev/dri:/dev/dri
    security_opt:
      - no-new-privileges:true
    restart: on-failure:10
    # custom-cont-init.d/01-wait-for-nas.sh waits up to 120s for /mnt/nas before starting Plex
