services:
  dispatcharr:
    # build:
    #   context: ..
    #   dockerfile: docker/Dockerfile.dev
    image: ghcr.io/dispatcharr/dispatcharr:base
    container_name: dispatcharr_debug
    ports:
      - 5656:5656 # API port
      - 9193:9191 # Web UI port
      - 8001:8001 # Socket port
      - 5678:5678 # Debugging port
    volumes:
      - ../:/app
    environment:
      - DISPATCHARR_ENV=dev
      - DISPATCHARR_DEBUG=true
      - REDIS_HOST=localhost
      - CELERY_BROKER_URL=redis://localhost:6379/0
      - DISPATCHARR_LOG_LEVEL=trace
      # Process Priority Configuration (Optional)
      # Lower values = higher priority. Range: -20 (highest) to 19 (lowest)
      # Negative values require cap_add: SYS_NICE (uncomment below)
      #- UWSGI_NICE_LEVEL=-5   # uWSGI/FFmpeg/Streaming (default: 0, recommended: -5 for high priority)
      #- CELERY_NICE_LEVEL=5   # Celery/EPG/Background tasks (default: 5, low priority)
    #
    # Uncomment to enable high priority for streaming (required if UWSGI_NICE_LEVEL < 0)
    #cap_add:
    #  - SYS_NICE
