Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
angusdevgo
ZCode2api
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
ZCode2api
/
docker-compose.yml
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
48 lines (47 loc) · 1.69 KB
main
Breadcrumbs
ZCode2api
/
docker-compose.yml
Copy path
Top
File metadata and controls
Code
Blame
48 lines (47 loc) · 1.69 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
# zcgw — ZCode 多账号反代网关
#
# docker compose up -d # 启动(首次自动建目录)
# docker compose logs -f # 跟日志
# docker compose down # 停止(数据保留)
# docker compose up -d --build # 更新代码后重建
#
# 数据全部落在 ./data/(宿主机可备份/编辑):
# accounts.json keys.json usage.jsonl pool-*.json security.json onboard-flows.json
#
# 首次部署:把 accounts.json / keys.json 等放到 ./data/ 再 up,或启动后用面板添加。
services:
zcgw:
build: .
image: zcgw:latest
container_name: zcgw
restart: unless-stopped
ports:
- "127.0.0.1:8787:8787" # 只本机 nginx 反代;如需直连 IP:8787 改回 "8787:8787"
environment:
# 监听容器内 0.0.0.0(必须,docker 端口映射依赖它)
HOST: 0.0.0.0
PORT: 8787
# 可选:主密钥(面板密钥之外的后门 key);一般留空用面板建的 key
GATEWAY_KEY: ""
# 上游与模型(一般不用改)
ZCODE_UPSTREAM_ORIGIN: "https://zcode.z.ai"
ZCODE_MODEL: "GLM-5.3-Flash"
# 调度参数可用环境变量覆盖(不设则用 data/pool-settings.json 或内置默认)
# ZCGW_TOPN: "3"
# ZCGW_MAX_INFLIGHT: "5"
volumes:
- ./data:/app/data
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:8787/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# 轻量加固
security_opt:
- no-new-privileges:true
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
You can’t perform that action at this time.