services:
  proxygo:
    build: .
    container_name: proxygo
    restart: unless-stopped
    ports:
      - "127.0.0.1:7776:7776"   # 稳定代理端口（最低延迟）
      - "127.0.0.1:7777:7777"   # 随机代理端口（轮换模式）
      - "7778:7778"               # WebUI 端口（外网可访问）
    volumes:
      - ./data:/app/data
    environment:
      - TZ=Asia/Shanghai
      - DATA_DIR=/app/data
      # - WEBUI_PASSWORD=your-password  # 自定义 WebUI 登录密码，默认: proxygo
    healthcheck:
      test: ["CMD", "wget", "-qO-", "http://localhost:7778/"]
      interval: 30s
      timeout: 5s
      retries: 3
    networks:
      - cursor2api_default

networks:
  cursor2api_default:
    external: true
