-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (74 loc) · 2.39 KB
/
docker-compose.yml
File metadata and controls
77 lines (74 loc) · 2.39 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
# Docker Compose for Requirements Advisor MCP Server
#
# Usage:
# docker compose up # Start server
# docker compose up -d # Start in background
# docker compose run ingestion # Run content ingestion
# docker compose down # Stop and remove containers
services:
# ===========================================
# MCP Server - Main service
# ===========================================
mcp-server:
build:
context: .
dockerfile: Dockerfile
container_name: requirements-advisor
ports:
- "${PORT:-8000}:8000"
environment:
- VOYAGE_API_KEY=${VOYAGE_API_KEY}
- VOYAGE_MODEL=${VOYAGE_MODEL:-voyage-context-3}
- VECTOR_STORE_TYPE=chroma
- VECTOR_STORE_PATH=/app/data/chroma
- IMAGE_CACHE_PATH=/app/data/images
- CONTENT_DIR=/app/content
- HOST=0.0.0.0
- PORT=8000
volumes:
# Persist vector store data
- chroma_data:/app/data/chroma
# Persist image cache
- image_cache:/app/data/images
# Mount content for reading (read-only)
- ./content:/app/content:ro
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8000/mcp', timeout=5)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# ===========================================
# Ingestion - One-shot content loader
# ===========================================
ingestion:
build:
context: .
dockerfile: Dockerfile
container_name: requirements-advisor-ingestion
environment:
- VOYAGE_API_KEY=${VOYAGE_API_KEY}
- VOYAGE_MODEL=${VOYAGE_MODEL:-voyage-context-3}
- VECTOR_STORE_TYPE=chroma
- VECTOR_STORE_PATH=/app/data/chroma
- IMAGE_CACHE_PATH=/app/data/images
- CONTENT_DIR=/app/content
volumes:
# Same volume as server for shared data
- chroma_data:/app/data/chroma
# Same image cache as server
- image_cache:/app/data/images
# Mount content for ingestion
- ./content:/app/content:ro
command: ["python", "-m", "requirements_advisor.cli", "ingest", "--clear", "--fetch-images"]
profiles:
- setup # Only runs when explicitly requested
# ===========================================
# Volumes
# ===========================================
volumes:
chroma_data:
driver: local
image_cache:
driver: local