-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
78 lines (73 loc) · 2.18 KB
/
Copy pathdocker-compose.yml
File metadata and controls
78 lines (73 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
version: "3.9"
# MCP Composition Demo - Local Development Stack
#
# Starts:
# - Redis (session memory and cache)
# - MCP server (all four sub-servers mounted on port 8000)
#
# Usage:
# docker-compose up # start everything
# docker-compose up redis # start Redis only
# docker-compose down # stop and remove containers
# docker-compose logs -f mcp # follow MCP server logs
#
# First time setup:
# cp .env.example .env
# Edit .env with your API keys
# docker-compose up
services:
# ---------------------------------------------------------------------------
# Redis
# Used for session memory and caching by all four MCP sub-servers.
# Two logical databases:
# DB 0: session memory (SESSION_BACKEND=redis)
# DB 1: cache (CACHE_BACKEND=redis)
# ---------------------------------------------------------------------------
redis:
image: redis:7-alpine
container_name: mcp-composition-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
# ---------------------------------------------------------------------------
# MCP Composition Server
# Mounts all four sub-servers on port 8000.
# Depends on Redis being healthy before starting.
# ---------------------------------------------------------------------------
mcp:
build:
context: .
dockerfile: Dockerfile
container_name: mcp-composition-demo
ports:
- "8000:8000"
env_file:
- .env
environment:
# Override to use real Redis when running in Docker
SESSION_BACKEND: redis
CACHE_BACKEND: redis
REDIS_HOST: redis
REDIS_PORT: 6379
MCP_PORT: 8000
MCP_TRANSPORT: sse
volumes:
# Mount logs directory for persistent log access
- ./logs:/app/logs
# Mount agent_config.json for runtime config changes without rebuild
- ./agent_config.json:/app/agent_config.json
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
volumes:
redis_data:
driver: local