Files
crewai/docker-compose.yml
2026-03-13 15:59:01 +08:00

51 lines
1.2 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.

version: '3.8'
services:
multi-agent-system:
build:
context: .
dockerfile: Dockerfile
container_name: multi-agent-delivery-system
restart: unless-stopped
ports:
- "8000:8000"
environment:
# DashScope API Key必需
- DASHSCOPE_API_KEY=${DASHSCOPE_API_KEY:sk-616332b2afa94699b4572d0fe6ac370a}
# 可选配置
- HOST=0.0.0.0
- PORT=8000
# 日志级别
- LOG_LEVEL=info
volumes:
# 挂载日志目录
- ./logs:/app/logs
# 如果需要持久化 .env 文件
- ./.env:/app/.env:ro
networks:
- agent-network
# 资源限制
deploy:
resources:
limits:
cpus: '2.0'
memory: 4G
reservations:
cpus: '0.5'
memory: 1G
# 健康检查
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
agent-network:
driver: bridge
# 使用示例:
# 开发环境docker-compose up -d
# 生产环境docker-compose --profile production up -d