feat: 集成 Agent 服务治理(ASG)部署配置

- docker-compose.yml 新增 easyai-asg-pg 和 easyai-asg 容器,comfy-server 增加 ASG TCP 连接环境变量
- 新增 .env.ASG.sample 环境变量模板,地址统一使用容器服务名替代固定 IP
- easyai-proxy.conf.sample 新增 /asg-api/ 反向代理配置
- README.md 新增 2026.3.2 更新记录及完整升级步骤

Made-with: Cursor
This commit is contained in:
2026-03-02 11:31:55 +08:00
parent 22583422e1
commit b94eb92d5f
4 changed files with 202 additions and 0 deletions
+59
View File
@@ -103,6 +103,9 @@ services:
- CONFIG_VIDEO_EDIT_API_URL=http://video-edit:8000
# 沙箱环境baseURL
- SANDBOX_SERVICE_BASE_URL=${SANDBOX_SERVICE_BASE_URL:-http://sandbox:8000}
# 服务治理 TCP 连接
- ASG_TCP_HOST=easyai-asg
- ASG_TCP_PORT=4003
# 日志大小设置,避免日志文件过大
env_file:
- .env
@@ -325,6 +328,61 @@ services:
timeout: 10s
retries: 3
start_period: 10s
easyai-asg-pg:
image: registry.cn-shanghai.aliyuncs.com/easyaigc/postgres:18-alpine
container_name: easyai-asg-pg
restart: unless-stopped
environment:
POSTGRES_USER: ${ASG_POSTGRES_USER:-easyai}
POSTGRES_PASSWORD: ${ASG_POSTGRES_PASSWORD:-easyai2025}
POSTGRES_DB: ${ASG_POSTGRES_DB:-agent_governance}
volumes:
- asg_postgres_data:/var/lib/postgresql/data
networks:
comfyai:
ipv4_address: 172.21.0.13
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${ASG_POSTGRES_USER:-easyai}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
easyai-asg:
container_name: easyai-asg
image: registry.cn-shanghai.aliyuncs.com/easyaigc/agent-governance:${ASG_VERSION:-latest}
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- "${ASG_PORT:-3003}:3003"
networks:
comfyai:
ipv4_address: 172.21.0.14
depends_on:
sg-postgres:
condition: service_healthy
redis:
condition: service_started
volumes:
- ./data/easyai-asg/.pm2:/app/.pm2
restart: unless-stopped
env_file:
- .env.ASG
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
deploy:
resources:
limits:
memory: 512MB
reservations:
memory: 128MB
# portainer:
# image: registry.cn-shanghai.aliyuncs.com/comfy-ai/portainer-ce:2.21.5
# container_name: portainer
@@ -368,6 +426,7 @@ volumes:
mongo_data:
portainer_data:
rabbitmq_data:
asg_postgres_data:
networks:
comfyai:
driver: bridge