Files
cursor2api/docker-compose.yml

49 lines
1.9 KiB
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:
# 挂载配置文件(可选)——先从 config.yaml.example 复制一份: cp config.yaml.example config.yaml
# 修改后只需 docker compose restart 即可生效;不挂载则使用内置默认值 + 环境变量
- ./config.yaml:/app/config.yaml:ro
# 日志持久化目录(需要在 config.yaml 或环境变量中开启 logging.file_enabled
- ./logs:/app/logs
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
# ── API 鉴权 ──
# 公网部署时强烈建议开启,多个 token 用逗号分隔
# - AUTH_TOKEN=sk-your-secret-token-1,sk-your-secret-token-2
# ── Thinking 开关(最高优先级,覆盖 config.yaml ──
# true=始终启用思考链, false=强制关闭
# - THINKING_ENABLED=true
# ── 历史消息压缩 ──
# - COMPRESSION_ENABLED=true
# - COMPRESSION_LEVEL=2
# ── 日志持久化 ──
# - LOG_FILE_ENABLED=true
# - LOG_DIR=./logs
# ── 浏览器指纹base64 JSON ──
# - FP=eyJ1c2VyQWdlbnQiOiIuLi4ifQ==
# ── Vision 图片处理 ──
# 默认使用本地 OCR零配置如需外部 Vision API 请在 config.yaml 中修改 vision.mode 为 'api'
# 并配置 vision.base_url / vision.api_key / vision.model