services:
  dev:
    platform: linux/amd64
    build:
      context: .
      dockerfile: Dockerfile.dev
    ports:
      - "3001:3001"
      - "5173:5173"
      - "4000:4000"
    volumes:
      - .:/workspace/agentteam
      - ~/.ssh:/root/.ssh:ro
      - go-cache:/root/.cache/go-build
      - go-mod-cache:/go/pkg/mod
      - node-modules:/workspace/agentteam/web/node_modules
      - ./.data/tiup/components:/root/.tiup/components
      - ./.data/tiup/data:/root/.tiup/data
    environment:
      - AGENTTEAM_DEV_FEATURES=${AGENTTEAM_DEV_FEATURES:-}
      - RETAIN_DATA=${RETAIN_DATA:-docker-dev}
    working_dir: /workspace/agentteam

volumes:
  go-cache:
  go-mod-cache:
  node-modules:
