-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
103 lines (99 loc) · 2.86 KB
/
docker-compose.yml
File metadata and controls
103 lines (99 loc) · 2.86 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
services:
# Qdrant vector database
qdrant:
image: qdrant/qdrant:latest
container_name: codebase-qdrant
ports:
- "6333"
- "6334"
volumes:
- qdrant_data:/qdrant/storage
environment:
- QDRANT__SERVICE__GRPC_PORT=6334
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:6333/healthz || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
# Neo4j graph database
neo4j:
image: neo4j:5.15-community
container_name: codebase-neo4j
ports:
- "7474:7474" # HTTP
- "7687:7687" # Bolt
volumes:
- neo4j_data:/data
- neo4j_logs:/logs
environment:
- NEO4J_AUTH=neo4j/codebase123
- NEO4J_PLUGINS=["apoc"]
- NEO4J_dbms_memory_heap_max__size=2G
- NEO4J_dbms_security_procedures_unrestricted=apoc.*
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:7474 || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# Indexer image (built but not run as a service - spawned on-demand by mcp-server)
indexer:
build:
context: .
dockerfile: Dockerfile.indexer
image: codebase-contextifier-9000-indexer
# Don't run as a service - this just ensures the image is built
deploy:
replicas: 0
# MCP Server for semantic code search
mcp-server:
build:
context: .
dockerfile: Dockerfile
container_name: codebase-mcp-server
depends_on:
- qdrant
- neo4j
volumes:
# Mount the codebase to be indexed (customize this path)
- ${CODEBASE_PATH:-./sample_codebase}:/workspace:ro
# Persistent storage for index data
- index_data:/index
# Persistent storage for embedding cache
- cache_data:/cache
# Mount Docker socket to enable spawning indexer containers
- /var/run/docker.sock:/var/run/docker.sock
environment:
- QDRANT_HOST=qdrant
- QDRANT_PORT=6333
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=codebase123
- ENABLE_GRAPH_DB=${ENABLE_GRAPH_DB:-true}
- OLLAMA_HOST=${OLLAMA_HOST:-http://host.docker.internal:11434}
- EMBEDDING_MODEL=${EMBEDDING_MODEL:-embeddinggemma:latest}
- INDEX_PATH=/index
- CACHE_PATH=/cache
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- WORKSPACE_PATH=/workspace
restart: unless-stopped
# Use stdin/stdout for MCP protocol communication
stdin_open: true
tty: true
# For Docker Desktop, use host.docker.internal to access host machine
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
qdrant_data:
driver: local
neo4j_data:
driver: local
neo4j_logs:
driver: local
index_data:
driver: local
cache_data:
driver: local