去掉MCP框架,重构

This commit is contained in:
lixinyue
2026-01-19 17:52:04 +08:00
parent 995b896b9d
commit 547ce858e7

View File

@@ -1,32 +1,5 @@
version: '3.9'
services:
# MCP Server - standalone service
mcp-server:
image: redbear-mem-open:latest
container_name: mcp-server
ports:
- "8081:8081" # MCP server port
env_file:
- .env
environment:
- SERVER_IP=0.0.0.0 # Bind to all interfaces
volumes:
- ./files:/files
- /etc/localtime:/etc/localtime:ro
command: python -m app.core.memory.agent.mcp_server.server
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8081/sse')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
networks:
- default
- celery
# FastAPI application - connects to MCP server
# FastAPI application
api:
image: redbear-mem-open:latest
container_name: api
@@ -35,37 +8,33 @@ services:
env_file:
- .env
environment:
- MCP_SERVER_URL=http://mcp-server:8081 # Back to using container name
- SERVER_IP=0.0.0.0 # Ensure MCP server binds to all interfaces
- SERVER_IP=0.0.0.0
# 如果代码里必须要 MCP_SERVER_URL可以先注释或指向占位
# - MCP_SERVER_URL=
volumes:
- ./files:/files
- /etc/localtime:/etc/localtime:ro
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload --log-level debug
depends_on:
mcp-server:
condition: service_healthy
restart: unless-stopped
networks:
- default
- celery
# Celery worker - connects to MCP server
# Celery worker
worker:
image: redbear-mem-open:latest
container_name: worker
env_file:
- .env
environment:
- MCP_SERVER_URL=http://mcp-server:8081 # Back to using container name
# - MCP_SERVER_URL=
volumes:
- ./files:/files
- /etc/localtime:/etc/localtime:ro
command: celery -A app.celery_worker.celery_app worker --loglevel=info
depends_on:
mcp-server:
condition: service_healthy
restart: unless-stopped
networks:
- celery
networks:
celery:
celery: