forked from Or4cl3AISolutions/NeuroForge-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
194 lines (179 loc) · 6.15 KB
/
Copy pathdocker-compose.yml
File metadata and controls
194 lines (179 loc) · 6.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
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
version: "3.9"
# ═══════════════════════════════════════════════════════════
# NeuroForge — Docker Compose (PoC)
# LLM: Gemma 4 E4B via Ollama (fully local, no API keys)
# ═══════════════════════════════════════════════════════════
services:
# ── Infrastructure ─────────────────────────────────────
neo4j:
image: neo4j:5.23-community
ports:
- "7474:7474" # Browser
- "7687:7687" # Bolt
environment:
NEO4J_AUTH: neo4j/${NEO4J_PASSWORD:-neuroforge_secret}
NEO4J_PLUGINS: '[]'
volumes:
- neo4j_data:/data
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://localhost:7474 || exit 1"]
interval: 10s
timeout: 5s
retries: 10
postgres:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER:-neuroforge}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-neuroforge_secret}
POSTGRES_DB: ${POSTGRES_DB:-neuroforge}
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-neuroforge}"]
interval: 5s
timeout: 3s
retries: 10
# ── Ollama (local LLM server) ──────────────────────────
ollama:
image: ollama/ollama:latest
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
# Uncomment below for GPU acceleration (requires nvidia-container-toolkit):
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:11434/api/tags || exit 1"]
interval: 10s
timeout: 5s
retries: 15
start_period: 15s
# Pulls Gemma 4 E4B into Ollama on first run, then exits
ollama-model-pull:
image: curlimages/curl:latest
depends_on:
ollama:
condition: service_healthy
entrypoint: >
sh -c '
echo "Pulling ${LLM_MODEL:-gemma4:e4b} into Ollama...";
curl -sf http://ollama:11434/api/pull -d "{\"name\": \"${LLM_MODEL:-gemma4:e4b}\"}" &&
echo "Model ready!"
'
restart: "no"
# ── Neo4j Seed Runner ──────────────────────────────────
neo4j-seed:
build: ./neo4j/seed
depends_on:
neo4j:
condition: service_healthy
environment:
NEO4J_URI: bolt://neo4j:7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: ${NEO4J_PASSWORD:-neuroforge_secret}
restart: "no"
# ── Backend Services ───────────────────────────────────
user-service:
build: ./services/user_service
ports:
- "8001:8001"
depends_on:
postgres:
condition: service_healthy
environment:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_USER: ${POSTGRES_USER:-neuroforge}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-neuroforge_secret}
POSTGRES_DB: ${POSTGRES_DB:-neuroforge}
knowledge-graph-service:
build: ./services/knowledge_graph_service
ports:
- "8002:8002"
depends_on:
neo4j:
condition: service_healthy
neo4j-seed:
condition: service_completed_successfully
environment:
NEO4J_URI: bolt://neo4j:7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: ${NEO4J_PASSWORD:-neuroforge_secret}
ai-mentor-service:
build: ./services/ai_mentor_service
ports:
- "8003:8003"
depends_on:
ollama:
condition: service_healthy
ollama-model-pull:
condition: service_completed_successfully
knowledge-graph-service:
condition: service_started
environment:
OLLAMA_URL: http://ollama:11434
LLM_MODEL: ${LLM_MODEL:-gemma4:e4b}
KNOWLEDGE_GRAPH_SERVICE_URL: http://knowledge-graph-service:8002
COGNITIVE_PROFILING_SERVICE_URL: http://cognitive-profiling-service:8004
cognitive-profiling-service:
build: ./services/cognitive_profiling_service
ports:
- "8004:8004"
content-delivery-service:
build: ./services/content_delivery_service
ports:
- "8005:8005"
learning-pathway-service:
build: ./services/learning_pathway_service
ports:
- "8006:8006"
depends_on:
postgres:
condition: service_healthy
environment:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_USER: ${POSTGRES_USER:-neuroforge}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-neuroforge_secret}
POSTGRES_DB: ${POSTGRES_DB:-neuroforge}
KNOWLEDGE_GRAPH_SERVICE_URL: http://knowledge-graph-service:8002
# ── API Gateway ────────────────────────────────────────
api-gateway:
build: ./services/api_gateway
ports:
- "8000:8000"
depends_on:
- user-service
- knowledge-graph-service
- ai-mentor-service
- cognitive-profiling-service
- content-delivery-service
- learning-pathway-service
environment:
USER_SERVICE_URL: http://user-service:8001
KNOWLEDGE_GRAPH_SERVICE_URL: http://knowledge-graph-service:8002
AI_MENTOR_SERVICE_URL: http://ai-mentor-service:8003
COGNITIVE_PROFILING_SERVICE_URL: http://cognitive-profiling-service:8004
CONTENT_DELIVERY_SERVICE_URL: http://content-delivery-service:8005
LEARNING_PATHWAY_SERVICE_URL: http://learning-pathway-service:8006
# ── Frontend ───────────────────────────────────────────
frontend:
build: ./frontend
ports:
- "3000:3000"
depends_on:
- api-gateway
environment:
REACT_APP_API_URL: http://localhost:8000
volumes:
neo4j_data:
pg_data:
ollama_data: