-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·240 lines (232 loc) · 7.02 KB
/
docker-compose.yml
File metadata and controls
executable file
·240 lines (232 loc) · 7.02 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
services:
sanctuary_vector_db:
image: chromadb/chroma:latest
container_name: sanctuary_vector_db
ports:
- "8110:8000"
volumes:
# Chroma writes to /data by default in current image version
- ${CHROMA_DATA_PATH:-.vector_data}:/data
environment:
- IS_PERSISTENT=TRUE
- ANONYMIZED_TELEMETRY=FALSE
- PERSIST_DIRECTORY=/chroma/chroma
- CHROMA_SERVER_HOST=0.0.0.0
- CHROMA_SERVER_HTTP_PORT=8000
restart: unless-stopped
healthcheck:
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- mcp_network
sanctuary_ollama:
image: ollama/ollama:latest
container_name: sanctuary_ollama
ports:
- "11434:11434"
volumes:
# Mount point for models persisted on the host machine
- ./ollama_models:/root/.ollama
environment:
- OLLAMA_HOST=0.0.0.0 # Use OLLAMA_MODEL from the host environment if available, otherwise default
- OLLAMA_MODEL=${OLLAMA_MODEL:-hf.co/richfrem/Sanctuary-Qwen2-7B-v1.0-GGUF-Final:Q4_K_M}
networks:
- mcp_network
entrypoint: [ "/bin/sh", "-c" ]
command:
- |
ollama serve &
# Wait for Ollama to be ready
echo "Waiting for Ollama API..."
until ollama list > /dev/null 2>&1; do
sleep 1
done
echo "Ollama is ready. Pulling model..."
ollama pull $${OLLAMA_MODEL:-Sanctuary-Qwen2-7B:latest}
wait
restart: unless-stopped
# Fleet of 8 - Container #1: sanctuary_utils (ADR 060)
sanctuary_utils:
build:
context: .
dockerfile: mcp_servers/gateway/clusters/sanctuary_utils/Dockerfile
container_name: sanctuary_utils
ports:
- "8100:8000"
volumes:
- .:/app
networks:
- mcp_network
environment:
- PORT=8000
- MCP_TRANSPORT=sse
- PYTHONPATH=/app
- MCP_GATEWAY_URL=https://mcp_gateway:4444
- MCPGATEWAY_BEARER_TOKEN=${MCPGATEWAY_BEARER_TOKEN}
command: [ "python", "-m", "mcp_servers.gateway.clusters.sanctuary_utils.server" ]
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/health" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
# Fleet of 8 - Container #2: sanctuary_filesystem (Task 128)
sanctuary_filesystem:
build:
context: .
dockerfile: mcp_servers/gateway/clusters/sanctuary_filesystem/Dockerfile
container_name: sanctuary_filesystem
ports:
- "8101:8000"
volumes:
- .:/app
networks:
- mcp_network
environment:
- PORT=8000
- MCP_TRANSPORT=sse
- PROJECT_ROOT=/app
- PYTHONUNBUFFERED=1
- MCP_GATEWAY_URL=https://mcp_gateway:4444
- MCPGATEWAY_BEARER_TOKEN=${MCPGATEWAY_BEARER_TOKEN}
command: [ "python", "-m", "mcp_servers.gateway.clusters.sanctuary_filesystem.server" ]
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/health" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
# Fleet of 8 - Container #3: sanctuary_network (Task 129)
sanctuary_network:
build:
context: .
dockerfile: mcp_servers/gateway/clusters/sanctuary_network/Dockerfile
container_name: sanctuary_network
ports:
- "8102:8000"
volumes:
- .:/app
networks:
- mcp_network
environment:
- PORT=8000
- MCP_TRANSPORT=sse
- PYTHONPATH=/app
- MCP_GATEWAY_URL=https://mcp_gateway:4444
- MCPGATEWAY_BEARER_TOKEN=${MCPGATEWAY_BEARER_TOKEN}
command: [ "python", "-m", "mcp_servers.gateway.clusters.sanctuary_network.server" ]
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/health" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
# Fleet of 8 - Container #4: sanctuary_git (Task 130)
sanctuary_git:
build:
context: .
dockerfile: mcp_servers/gateway/clusters/sanctuary_git/Dockerfile
container_name: sanctuary_git
ports:
- "8103:8000"
volumes:
- .:/app
networks:
- mcp_network
environment:
- PORT=8000
- MCP_TRANSPORT=sse
- PROJECT_ROOT=/app
- PYTHONPATH=/app
- MCP_GATEWAY_URL=https://mcp_gateway:4444
- MCPGATEWAY_BEARER_TOKEN=${MCPGATEWAY_BEARER_TOKEN}
- GITHUB_TOKEN=${GITHUB_TOKEN}
- GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME:-Sanctuary Agent}
- GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-agent@sanctuary.project}
- GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME:-Sanctuary Agent}
- GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL:-agent@sanctuary.project}
command: [ "python", "-m", "mcp_servers.gateway.clusters.sanctuary_git.server" ]
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/health" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
# Fleet of 8 - Container #5: sanctuary_cortex (Task 131)
sanctuary_cortex:
build:
context: .
dockerfile: mcp_servers/gateway/clusters/sanctuary_cortex/Dockerfile
container_name: sanctuary_cortex
ports:
- "8104:8000"
volumes:
- .:/app
environment:
- PROJECT_ROOT=/app
- PYTHONPATH=/app
- PORT=8000
- MCP_TRANSPORT=sse
- CHROMA_HOST=sanctuary_vector_db
- CHROMA_PORT=8000
- OLLAMA_HOST=http://sanctuary_ollama:11434
- MCP_GATEWAY_URL=https://mcp_gateway:4444
- MCPGATEWAY_BEARER_TOKEN=${MCPGATEWAY_BEARER_TOKEN}
networks:
- mcp_network
depends_on:
- sanctuary_vector_db
- sanctuary_ollama
command: [ "python", "-m", "mcp_servers.gateway.clusters.sanctuary_cortex.server" ]
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/health" ]
interval: 60s
timeout: 30s
retries: 5
start_period: 600s
restart: unless-stopped
# Fleet of 8 - Container #6: sanctuary_domain (ADR 061)
# Hosting: Chronicle, Protocol, Task, ADR, and Python Dev Tools
sanctuary_domain:
build:
context: .
dockerfile: mcp_servers/gateway/clusters/sanctuary_domain/Dockerfile
container_name: sanctuary_domain
ports:
- "8105:8105"
volumes:
# Mount project root to allow tools to access all files (linting, etc.)
- .:/app
networks:
- mcp_network
environment:
- PROJECT_ROOT=/app
- PORT=8105
- MCP_TRANSPORT=sse
- MCP_GATEWAY_URL=https://mcp_gateway:4444
- MCPGATEWAY_BEARER_TOKEN=${MCPGATEWAY_BEARER_TOKEN}
deploy:
resources:
limits:
cpus: '1.0'
memory: '512M'
command: [ "python", "-m", "mcp_servers.gateway.clusters.sanctuary_domain.server" ]
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8105/health" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
networks:
mcp_network:
# bridge driver required for container-to-container communication
driver: bridge
external: true
name: mcp_network