services:
  drawio:
    image: jgraph/drawio:latest
    ports: ["8080:8080"]
  next-ai-draw-io:
    build:
      context: .
      args:
        - NEXT_PUBLIC_DRAWIO_BASE_URL=http://localhost:8080
        # Uncomment below for subdirectory deployment
        # - NEXT_PUBLIC_BASE_PATH=/nextaidrawio
    ports: ["3000:3000"]
    env_file: .env
    volumes:
      # Persists admin panel settings (data/settings.json)
      - ./data:/app/data
    # environment:
    #   # For subdirectory deployment, uncomment and set your path:
    #   NEXT_PUBLIC_BASE_PATH: /nextaidrawio
    depends_on: [drawio]
