services:
  web:
    build: .
    ports:
      - "8000:8000"
    volumes:
      # Mount your song library folder (adjust path for your system)
      - ${LIBRARY_PATH:-./library}:/dlc
      # Persistent config and cache
      - feedBack-config:/config
      # Mount source for live reload during development
      - ./static:/app/static
      - ./server.py:/app/server.py
      - ./VERSION:/app/VERSION
      - ./ug_browser.py:/app/ug_browser.py
      - ./lib:/app/lib
      - ./plugins:/app/plugins
      - ./.git:/app/.git:ro
    environment:
      - PYTHONPATH=/app/lib:/app
      - DLC_DIR=/dlc
      - CONFIG_DIR=/config
      # Write note_detect recordings to the host-visible bind mount (./static)
      # rather than the /config Docker volume: recorded takes (and training
      # bundles) then land in static/note_detect_recordings/ on the host, where
      # the offline harness can read them directly.
      - STATIC_DIR=/app/static
      # Logging (optional)
      # - LOG_LEVEL=DEBUG       # DEBUG | INFO | WARNING | ERROR  (default: INFO)
      # - LOG_FORMAT=json       # json | text  (default: text — coloured console)
      # - LOG_FILE=/config/feedBack.log  # also write to a persistent file
    dns:
      - 8.8.8.8
      - 1.1.1.1

volumes:
  feedBack-config:
