# reaper-web - 
services:
  reaper:
    image: git.wompmacho.com/wompmacho/reaper-web:latest
    container_name: reaper-web
    privileged: true # Required for low-latency scheduling and /dev/snd access
    shm_size: "1gb" # Critical for GUI performance in KasmVNC
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
      - VNC_PASSWORD=${VNC_PASSWORD} # Managed via .env
      - PIPEWIRE_LATENCY=128/48000
    volumes:
      # Default REAPER configuration from image
      - ${APP_PATH}/config:/config
      # VST/CLAP/LV2 Plugins (Persistent)
      - ${DATA_PATH}/vst:/vst
      - ${DATA_PATH}/vst3:/usr/lib/vst3
      - ${DATA_PATH}/lv2:/usr/lib/lv2
      # Project files (Persistent)
      - ${DATA_PATH}/projects:/projects
      # Audio/MIDI Hardware Passthrough
      - /dev/snd:/dev/snd
    ports:
      - ${REAPER_HTTP_PORT}:3000 # HTTP Web UI
      - ${REAPER_HTTPS_PORT}:3001 # HTTPS Web UI
    restart: unless-stopped
    labels:
      # Nginx Proxy Manager Automation
      - "npm.proxy.domains=reaper"
      - "npm.proxy.host=${DOCKER_HOST_IP}"
      - "npm.proxy.port=${REAPER_HTTP_PORT}"
      - "npm.proxy.scheme=http"
      - "npm.proxy.websockets=true"
      # Pi-hole Automation (Point to Docker Host/Proxy IP)
      - "pihole.custom-record=[[\"reaper\", \"${DOCKER_HOST_IP}\"]]"
