-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
158 lines (149 loc) · 4.15 KB
/
docker-compose.yml
File metadata and controls
158 lines (149 loc) · 4.15 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
# Microservices Architecture - Each agent runs as a separate container
#
# Benefits:
# - Independent scaling (scale graph-query separately from indexer)
# - Better resource isolation
# - Horizontal scaling with replicas
# - Easier debugging and monitoring per agent
#
# Usage:
# docker compose up -d
# docker compose up -d --scale graph-query-agent=3
services:
# ===========================================
# Neo4j Graph Database
# ===========================================
neo4j:
image: neo4j:5-community
container_name: repo-chat-neo4j
ports:
- "7474:7474"
- "7687:7687"
environment:
- NEO4J_AUTH=neo4j/password
- NEO4J_PLUGINS=["apoc"]
volumes:
- neo4j_data:/data
- neo4j_logs:/logs
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:7474 || exit 1"]
interval: 10s
timeout: 10s
retries: 10
start_period: 30s
networks:
- repo-chat-network
# ===========================================
# Graph Query Agent (scalable)
# ===========================================
graph-query-agent:
build:
context: ./graph-query-agent
dockerfile: Dockerfile
environment:
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=password
- MCP_TRANSPORT=http
- MCP_PORT=8001
depends_on:
neo4j:
condition: service_healthy
networks:
- repo-chat-network
# Can scale: docker compose up -d --scale graph-query-agent=3
# ===========================================
# Code Analyst Agent (scalable)
# ===========================================
code-analyst-agent:
build:
context: ./code-analyst-agent
dockerfile: Dockerfile
environment:
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=password
- OPENAI_API_KEY=${OPENAI_API_KEY}
- LLM_MODEL_ID=${LLM_MODEL_ID:-gpt-4o-mini}
- MCP_TRANSPORT=http
- MCP_PORT=8002
depends_on:
neo4j:
condition: service_healthy
volumes:
- repo_cache:/tmp/repo-cache
networks:
- repo-chat-network
# ===========================================
# Indexer Agent
# ===========================================
indexer-agent:
build:
context: ./indexer-agent
dockerfile: Dockerfile
environment:
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=password
- REPO_URL=${REPO_URL:-}
- REPO_DIR=/tmp/repo-cache
- MCP_TRANSPORT=http
- MCP_PORT=8003
depends_on:
neo4j:
condition: service_healthy
volumes:
- repo_cache:/tmp/repo-cache
networks:
- repo-chat-network
# ===========================================
# Orchestrator Agent
# ===========================================
orchestrator-agent:
build:
context: ./orchestrator-agent
dockerfile: Dockerfile
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- LLM_MODEL_ID=${LLM_MODEL_ID:-gpt-4o-mini}
- GRAPH_AGENT_URL=http://graph-query-agent:8001/mcp
- CODE_AGENT_URL=http://code-analyst-agent:8002/mcp
- MCP_TRANSPORT=http
- MCP_PORT=8004
depends_on:
- graph-query-agent
- code-analyst-agent
networks:
- repo-chat-network
# ===========================================
# API Gateway (entry point)
# ===========================================
api-gateway:
build:
context: ./api-gateway
dockerfile: Dockerfile
container_name: repo-chat-api
ports:
- "8000:8000"
environment:
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=password
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ORCHESTRATOR_URL=http://orchestrator-agent:8004/mcp
- INDEXER_URL=http://indexer-agent:8003/mcp
- GRAPH_QUERY_URL=http://graph-query-agent:8001/mcp
- CODE_ANALYST_URL=http://code-analyst-agent:8002/mcp
depends_on:
- orchestrator-agent
- indexer-agent
networks:
- repo-chat-network
restart: unless-stopped
volumes:
neo4j_data:
neo4j_logs:
repo_cache:
networks:
repo-chat-network:
driver: bridge