version: "3.8"

services:
  qwen-agent:
    build: .
    container_name: qwen-agent-api
    ports:
      - "8001:8001"
    environment:
      # 应用配置
      - PYTHONPATH=/app
      - PYTHONUNBUFFERED=1
      - AGENT_POOL_SIZE=2
    volumes:
      # 挂载项目数据目录
      - ./projects:/app/projects
      - ./public:/app/public
    restart: unless-stopped

    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8001/api/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
