zai / docker-compose.yml
sanbo110's picture
update sth at 2025-10-23 17:38:54
fdc7f56
raw
history blame contribute delete
944 Bytes
services:
api-server:
build:
context: ..
dockerfile: deploy/Dockerfile
container_name: z-ai-api-server
ports:
- "7860:7860"
volumes:
# 数据库持久化存储
- ./data:/app/data
# 日志持久化存储(可选)
- ./logs:/app/logs
environment:
- ADMIN_PASSWORD=admin123
# Auth Configuration
- AUTH_TOKEN=sk-your-api-key
# 是否跳过api key验证
- SKIP_AUTH_TOKEN=false
# 调试日志
- DEBUG_LOGGING=true
# 匿名模式
- ANONYMOUS_MODE=true
# Function Call 功能开关
- TOOL_SUPPORT=true
# 工具调用扫描限制(字符数)
- SCAN_LIMIT=200000
# 数据库路径 - 使用持久化卷
- DB_PATH=/app/data/tokens.db
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7860/v1/models"]
interval: 30s
timeout: 10s
retries: 3