sub2api/deploy/docker-compose.windsurf.yml
win 21325afb33
Some checks failed
CI / test (push) Failing after 10s
CI / frontend (push) Failing after 8s
CI / golangci-lint (push) Failing after 5s
Security Scan / backend-security (push) Failing after 5s
Security Scan / frontend-security (push) Failing after 4s
feat(windsurf): 补全ops日志记录与endpoint派生,对齐其他平台
- windsurf_gateway_service: 添加上游延迟/TTFT/错误上下文记录
- endpoint: DeriveUpstreamEndpoint 添加 PlatformWindsurf 分支
- ops_error_logger: guessPlatformFromPath 添加 /windsurf/ 识别
2026-04-23 20:46:27 +08:00

66 lines
2.4 KiB
YAML
Raw 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.

# =============================================================================
# Windsurf Language Server — 独立 Compose 文件
# =============================================================================
# 启动方式:
# docker compose -f docker-compose.yml -f docker-compose.windsurf.yml up -d
#
# 构建 LS 镜像:
# 1. 将 language_server_linux_x64 放到 deploy/ 目录
# 2. docker compose -f docker-compose.yml -f docker-compose.windsurf.yml build windsurf-ls
#
# Multi-proxy复制 windsurf-ls 服务并修改 LS_PORT 和 HTTPS_PROXY
# windsurf-ls-proxy1:
# extends: { service: windsurf-ls }
# environment:
# - LS_PORT=42101
# - HTTPS_PROXY=http://user:pass@proxy1:8080
# - HTTP_PROXY=http://user:pass@proxy1:8080
# ports: ["42101:42101"]
# =============================================================================
services:
# 覆盖主服务:注入 LS 连接参数 + 添加依赖
sub2api:
environment:
- WINDSURF_ENABLED=true
- WINDSURF_FIREBASE_API_KEY=${WINDSURF_FIREBASE_API_KEY:-AIzaSyDsOl-1XpT5err0Tcnx8FFod1H8gVGIycY}
- WINDSURF_DOCKER_HOST=host.docker.internal
- WINDSURF_DOCKER_PORT=${WINDSURF_LS_PORT:-42099}
- WINDSURF_DOCKER_CSRF_TOKEN=${LS_CSRF_TOKEN:-ad2d9f01-4e7b-8c3a-b5f6-1d8e9a0c7b2f}
- WINDSURF_LS_MODE=${WINDSURF_LS_MODE:-docker}
depends_on:
windsurf-ls:
condition: service_healthy
# ===========================================================================
# Windsurf Language Server (local gRPC for Cascade chat)
# Must use host network — LS validates CSRF tokens only from loopback.
# ===========================================================================
windsurf-ls:
build:
context: ..
dockerfile: deploy/Dockerfile.ls
image: windsurf-ls:latest
container_name: sub2api-windsurf-ls
restart: unless-stopped
network_mode: host
volumes:
- windsurf_ls_data:/data
environment:
- LS_PORT=42099
- LS_CSRF_TOKEN=${LS_CSRF_TOKEN:-ad2d9f01-4e7b-8c3a-b5f6-1d8e9a0c7b2f}
- LS_API_SERVER_URL=${LS_API_SERVER_URL:-https://server.self-serve.windsurf.com}
- HTTPS_PROXY=${LS_HTTPS_PROXY:-}
- HTTP_PROXY=${LS_HTTP_PROXY:-}
- TZ=${TZ:-Asia/Shanghai}
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "42099"]
interval: 10s
timeout: 3s
retries: 5
start_period: 15s
volumes:
windsurf_ls_data:
driver: local