services:
  # ─────────────────────────────────────────────
  # PicoClaw Agent (one-shot query)
  #   docker compose run --rm picoclaw-agent -m "Hello"
  # ─────────────────────────────────────────────
  picoclaw-agent:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: picoclaw-agent
    profiles:
      - agent
    volumes:
      - ./config/config.json:/root/.picoclaw/config.json:ro
      - picoclaw-workspace:/root/.picoclaw/workspace
    entrypoint: ["picoclaw", "agent"]
    stdin_open: true
    tty: true

  # ─────────────────────────────────────────────
  # PicoClaw Gateway (Long-running Bot)
  #   docker compose up picoclaw-gateway
  # ─────────────────────────────────────────────
  picoclaw-gateway:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: picoclaw-gateway
    restart: unless-stopped
    profiles:
      - gateway
    volumes:
      # Configuration file
      - ./config/config.json:/root/.picoclaw/config.json:ro
      # Persistent workspace (sessions, memory, logs)
      - picoclaw-workspace:/root/.picoclaw/workspace
    command: ["gateway"]

volumes:
  picoclaw-workspace:
