version: '3.8'

services:
  dagster:
    build: .
    container_name: pickle-dagster
    ports:
      - "3000:3000"
    volumes:
      # Mount data directory for pipeline outputs (frames, detections, JSON)
      - ./data:/app/data
      # Mount dagster_home for Dagster metadata (history, logs, storage)
      - ./dagster_home:/app/dagster_home
      # Mount models directory
      - ./models:/app/models
      # Mount video file
      - ./DJI_0017.MP4:/app/DJI_0017.MP4
      # Mount source code for hot reload
      - ./dagster_project:/app/dagster_project
      - ./src:/app/src
    environment:
      - PYTHONUNBUFFERED=1
      - DAGSTER_HOME=/app/dagster_home
      - ROBOFLOW_API_KEY=JxrPOJZjb5lwHw0pnxey
    restart: unless-stopped
    command: dagster dev -m dagster_project --host 0.0.0.0 --port 3000

  # Optional: Redis for Celery (if you want to add it later)
  # redis:
  #   image: redis:7-alpine
  #   container_name: pickle-redis
  #   ports:
  #     - "6379:6379"
  #   restart: unless-stopped
