-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
157 lines (136 loc) · 3.9 KB
/
docker-compose.yml
File metadata and controls
157 lines (136 loc) · 3.9 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# MCP Builder - Docker Compose Configuration
# Supports development and production deployments
version: '3.8'
services:
# Production MCP Server
mcp-server:
build:
context: .
dockerfile: Dockerfile
target: production
container_name: mcp-server
restart: unless-stopped
environment:
# Server configuration
- MCP_HELLO_SERVER_NAME=MCP Builder Server
- MCP_HELLO_VERSION=1.0.0
- MCP_HELLO_TRANSPORT_TYPE=stdio
# Logging configuration
- MCP_HELLO_LOG_LEVEL=INFO
- MCP_HELLO_DEBUG_MODE=false
# Feature toggles
- MCP_HELLO_ENABLE_GREETING_TOOL=true
- MCP_HELLO_ENABLE_SERVER_INFO_TOOL=true
- MCP_HELLO_ENABLE_STATUS_RESOURCE=true
volumes:
# Mount logs directory for persistent logging
- ./logs:/app/logs
# Health check
healthcheck:
test: ["CMD", "python", "-c", "import sys; sys.exit(0)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Resource limits
deploy:
resources:
limits:
memory: 512M
cpus: '0.5'
reservations:
memory: 256M
cpus: '0.25'
# SSE Transport MCP Server (for web integrations)
mcp-server-sse:
build:
context: .
dockerfile: Dockerfile
target: production
container_name: mcp-server-sse
restart: unless-stopped
ports:
- "8000:8000"
environment:
# Server configuration for SSE transport
- MCP_HELLO_SERVER_NAME=MCP Builder SSE Server
- MCP_HELLO_VERSION=1.0.0
- MCP_HELLO_TRANSPORT_TYPE=sse
- MCP_HELLO_HOST=0.0.0.0
- MCP_HELLO_PORT=8000
# Logging configuration
- MCP_HELLO_LOG_LEVEL=INFO
- MCP_HELLO_DEBUG_MODE=false
# Feature configuration
- MCP_HELLO_ENABLE_GREETING_TOOL=true
- MCP_HELLO_ENABLE_SERVER_INFO_TOOL=true
- MCP_HELLO_ENABLE_STATUS_RESOURCE=true
volumes:
- ./logs:/app/logs
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health", "||", "exit", "1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
deploy:
resources:
limits:
memory: 512M
cpus: '0.5'
reservations:
memory: 256M
cpus: '0.25'
# Development MCP Server with hot reloading
mcp-server-dev:
build:
context: .
dockerfile: Dockerfile
target: development
container_name: mcp-server-dev
volumes:
# Mount source code for development
- ./src:/app/src
- ./pyproject.toml:/app/pyproject.toml
- ./logs:/app/logs
environment:
# Development configuration
- MCP_HELLO_SERVER_NAME=MCP Builder Dev Server
- MCP_HELLO_VERSION=dev
- MCP_HELLO_TRANSPORT_TYPE=stdio
# Development logging
- MCP_HELLO_LOG_LEVEL=DEBUG
- MCP_HELLO_DEBUG_MODE=true
# Enable all features for development
- MCP_HELLO_ENABLE_GREETING_TOOL=true
- MCP_HELLO_ENABLE_SERVER_INFO_TOOL=true
- MCP_HELLO_ENABLE_STATUS_RESOURCE=true
- MCP_HELLO_ENABLE_USAGE_STATS_RESOURCE=true
- MCP_HELLO_ENABLE_FORMAL_GREETING_PROMPT=true
- MCP_HELLO_ENABLE_CASUAL_GREETING_PROMPT=true
# Override command for development
command: python src/server.py
profiles:
- development
# Testing service for running tests in containerized environment
mcp-server-test:
build:
context: .
dockerfile: Dockerfile
target: development
container_name: mcp-server-test
volumes:
- ./src:/app/src
- ./pyproject.toml:/app/pyproject.toml
- ./tests:/app/tests
environment:
- MCP_HELLO_LOG_LEVEL=ERROR # Reduce noise during testing
command: python -m pytest src/ -v
profiles:
- testing
volumes:
logs:
driver: local
networks:
default:
name: mcp-builder-network