feat: 新增 Agent 记忆服务部署、重命名容器、整理 env 配置
- 新增 agent-memory 服务与 .env.AMS.sample - easyai-pgvector 共用 PostgreSQL,独立库 easyai_memory - 新增 docker/postgres/init-pgvector.sql 初始化 - 容器名: comfyAI-web→easyai-web, comfy-server→easyai-server - easyai-asg-pg→easyai-pgvector - 记忆服务端口配置移至 .env(comfy-server 调用用) - 整理 .env.sample 结构,新增 /ams-api/ Nginx 代理 Made-with: Cursor
This commit is contained in:
+43
-7
@@ -3,7 +3,7 @@
|
||||
#version: '3'
|
||||
services:
|
||||
comfyAI-web:
|
||||
container_name: comfyAI-web
|
||||
container_name: easyai-web
|
||||
#更新修改冒号后面的版本号
|
||||
image: registry.cn-shanghai.aliyuncs.com/comfy-ai/one-ai:${VERSION}
|
||||
#端口冲突时,只需要修改前面的端口比如修改为,3011:3010
|
||||
@@ -47,7 +47,7 @@ services:
|
||||
reservations:
|
||||
memory: 600MB
|
||||
comfy-server:
|
||||
container_name: comfy-server
|
||||
container_name: easyai-server
|
||||
# 阿里云镜像地址
|
||||
image: registry.cn-shanghai.aliyuncs.com/comfy-ai/comfy-server:${VERSION} # 阿里云
|
||||
labels:
|
||||
@@ -108,6 +108,9 @@ services:
|
||||
# 服务治理 TCP 连接
|
||||
- ASG_TCP_HOST=easyai-asg
|
||||
- ASG_TCP_PORT=4003
|
||||
# Agent 记忆服务 TCP 连接(来自 .env)
|
||||
- MEMORY_TCP_HOST=${MEMORY_TCP_HOST:-agent-memory}
|
||||
- MEMORY_TCP_PORT=${MEMORY_TCP_PORT:-4004}
|
||||
# 日志大小设置,避免日志文件过大
|
||||
env_file:
|
||||
- .env
|
||||
@@ -350,17 +353,19 @@ 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
|
||||
easyai-pgvector:
|
||||
# 使用带 pgvector 的镜像,供 ASG 与 Agent 记忆服务共用
|
||||
image: registry.cn-shanghai.aliyuncs.com/easyaigc/pgvector:0.8.2-pg18-trixie
|
||||
container_name: easyai-pgvector
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${ASG_POSTGRES_USER:-easyai}
|
||||
POSTGRES_PASSWORD: ${ASG_POSTGRES_PASSWORD:-easyai2025}
|
||||
POSTGRES_DB: ${ASG_POSTGRES_DB:-agent_governance}
|
||||
volumes:
|
||||
# PG 18+ 数据目录改为 /var/lib/postgresql/18/docker,需挂载父目录 /var/lib/postgresql
|
||||
- asg_postgres_data:/var/lib/postgresql
|
||||
# 首次启动时执行,创建 pgvector 扩展供记忆服务使用
|
||||
- ./docker/postgres/init-pgvector.sql:/docker-entrypoint-initdb.d/02-init-pgvector.sql
|
||||
networks:
|
||||
comfyai:
|
||||
ipv4_address: 172.21.0.13
|
||||
@@ -386,7 +391,7 @@ services:
|
||||
comfyai:
|
||||
ipv4_address: 172.21.0.14
|
||||
depends_on:
|
||||
easyai-asg-pg:
|
||||
easyai-pgvector:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
@@ -406,6 +411,37 @@ services:
|
||||
memory: 512MB
|
||||
reservations:
|
||||
memory: 128MB
|
||||
agent-memory:
|
||||
profiles:
|
||||
- memory
|
||||
container_name: agent-memory
|
||||
image: registry.cn-shanghai.aliyuncs.com/easyaigc/agent-memory:${AMS_VERSION:-latest}
|
||||
labels:
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
ports:
|
||||
- "${AMS_PORT:-3004}:3004"
|
||||
networks:
|
||||
comfyai:
|
||||
ipv4_address: 172.21.0.16
|
||||
depends_on:
|
||||
easyai-pgvector:
|
||||
condition: service_healthy
|
||||
comfy-server:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env.AMS
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user