# CleanCut: one container. Plex is your own existing install (or see below).
#
#   docker compose up -d     then open http://<server>:8585
#
# Change the folders on the left:
#   ./config  -> where CleanCut keeps its settings (small)
#   /mnt/media -> your movies and shows (CleanCut adds a clean audio track to each file:
#                 back up anything irreplaceable first). Choose the folders in CleanCut's setup.
#   /mnt/media/data -> a folder on your BIG media drive for new titles CleanCut downloads (optional feature)

services:
  clean-media:
    image: ghcr.io/lumblehamb/clean-media-stack:latest
    container_name: clean-media
    restart: unless-stopped
    stop_grace_period: 60s
    cap_add: [NET_ADMIN]               # the optional VPN and its kill-switch need this
    extra_hosts:                       # lets CleanCut find a Plex installed on this same computer
      - "host.docker.internal:host-gateway"
    devices:
      - /dev/net/tun:/dev/net/tun
      # Intel/AMD graphics shrink oversized videos much faster. Linux only: remove the #
      # (Windows/Mac Docker Desktop has no /dev/dri).
      # - /dev/dri:/dev/dri
    # NVIDIA graphics card (needs the NVIDIA Container Toolkit): remove the # below.
    # gpus: all
    environment:
      PUID: 1000                       # the user that should own your media files
      PGID: 1000
      TZ: America/Chicago
    ports:
      - 8585:8585                      # the dashboard: the only thing you ever open
    volumes:
      - ./config:/config
      - /mnt/media:/media              # your movies and shows (e.g. /mnt/media/Movies -> /media/Movies)
      - /mnt/media/data:/data

  # Don't have Plex yet? Uncomment this. Point Plex's libraries at /data/media/movies and /data/media/tv.
  # plex:
  #   image: plexinc/pms-docker:latest
  #   container_name: plex
  #   restart: unless-stopped
  #   network_mode: host
  #   environment: { TZ: America/Chicago, PLEX_UID: 1000, PLEX_GID: 1000 }
  #   volumes:
  #     - ./plex:/config
  #     - /mnt/media/data/media:/data/media:ro
