Files
cursor2api/docker-compose.yml
小海 5526d8859e chore(docker): 同步 Docker 配置至 v2.3.0
- Dockerfile: 新增 COPY config.yaml 使容器内置默认配置
- docker-compose.yml: 启用 config.yaml 挂载,移除已废弃的 SCRIPT_URL/FP 引用,增加 vision/OCR 说明
- .dockerignore: 补充 Docker 自身配置/文档/压缩包到忽略列表
2026-03-06 11:27:47 +08:00

27 lines
1019 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
services:
cursor2api:
build:
context: .
dockerfile: Dockerfile
image: cursor2api:latest
container_name: cursor2api
restart: unless-stopped
ports:
- "3010:3010"
volumes:
# 挂载外部配置文件(推荐)——修改后只需 docker compose restart 即可生效
- ./config.yaml:/app/config.yaml:ro
environment:
- NODE_ENV=production
- PORT=3010
- TIMEOUT=120
# ⚠️ 部署到海外机器无需代理,如果在国内云,取消注释并填入你的本机 http/socks 代理
# - PROXY=http://host.docker.internal:7890
# [可选环境变量] 以下变量如果声明,将会覆盖 config.yaml 中对应的配置:
# - CURSOR_MODEL=anthropic/claude-sonnet-4.6
# ── Vision 图片处理v2.3.0 新增) ──
# 默认使用本地 OCR零配置如需外部 Vision API 请在 config.yaml 中修改 vision.mode 为 'api'
# 并配置 vision.base_url / vision.api_key / vision.model