-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.full.yml
More file actions
86 lines (72 loc) · 1.95 KB
/
Copy pathdocker-compose.full.yml
File metadata and controls
86 lines (72 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: "3.9"
services:
# ========================================
# Command Code Proxy 服务(完整配置)
# ========================================
commandcode-proxy:
image: al1ya/commandcode-proxy:latest
build:
context: .
dockerfile: Dockerfile
container_name: commandcode-proxy
restart: unless-stopped
# 端口映射
ports:
- "${PROXY_PORT:-3050}:3050"
# 环境变量配置
environment:
# 服务配置
PORT: "${PORT:-3050}"
HOST: "${HOST:-0.0.0.0}"
# API 配置
CC_API_BASE: "${CC_API_BASE:-https://api.commandcode.ai}"
PROJECT_SLUG: "${PROJECT_SLUG:-cc-proxy}"
# 日志配置
LOG_FILE: "${LOG_FILE:-}"
LOG_LEVEL: "${LOG_LEVEL:-info}"
# 模型配置
CC_USE_PROVIDER_MODELS: "${CC_USE_PROVIDER_MODELS:-true}"
# 时区设置
TZ: "${TZ:-Asia/Shanghai}"
# 卷挂载(可选 - 用于持久化日志和配置)
volumes:
- ./logs:/app/logs
# 如果需要自定义配置,取消下面的注释
# - ./config.json:/app/config.json:ro
# 健康检查
healthcheck:
test: ["CMD", "wget", "--spider", "--quiet", "http://127.0.0.1:3050/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# 资源限制(可选)
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
# 网络配置
networks:
- proxy-network
# 日志配置
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# ========================================
# 网络配置
# ========================================
networks:
proxy-network:
driver: bridge
# ========================================
# 卷配置(如果需要持久化数据)
# ========================================
volumes:
proxy-logs:
driver: local