Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
189 lines (177 loc) · 5.53 KB
/
Copy pathdocker-compose.yml
File metadata and controls
189 lines (177 loc) · 5.53 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
# ============================================================================
# NEXUS - Multi-Agent Behavioural Analysis System
# Docker Compose - Local Development Environment
# ============================================================================
#
# USAGE:
# docker compose up -d → Start all services
# docker compose logs -f → Watch logs
# docker compose down → Stop all
# docker compose down -v → Stop + delete data
#
# SERVICES:
# postgres → PostgreSQL 16 + pgvector (config, transcripts, signals, vectors)
# redis → Valkey 8 (inter-agent message bus)
# voice → Voice Agent (Python FastAPI)
# language → Language Agent (Python FastAPI)
# fusion → Fusion Agent (Python FastAPI)
# api → API Gateway (Python FastAPI) - dashboard backend
# dashboard → React Admin Dashboard (dev server)
#
# PORTS:
# 5432 → PostgreSQL
# 6379 → Redis/Valkey
# 8001 → Voice Agent API
# 8002 → Language Agent API
# 8003 → Fusion Agent API
# 8000 → API Gateway
# 5173 → Dashboard (React dev server)
#
# ============================================================================
services:
# --------------------------------------------------------------------------
# INFRASTRUCTURE
# --------------------------------------------------------------------------
postgres:
image: pgvector/pgvector:pg16
container_name: nexus-postgres
restart: unless-stopped
environment:
POSTGRES_DB: nexus
POSTGRES_USER: nexus
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-nexus_dev_2026}
ports:
- "${POSTGRES_PORT:-5436}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./infrastructure/postgres/init:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U nexus -d nexus"]
interval: 5s
timeout: 5s
retries: 10
networks:
- nexus-network
redis:
image: valkey/valkey:8-alpine
container_name: nexus-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
- ./infrastructure/redis/valkey.conf:/etc/valkey/valkey.conf
command: valkey-server /etc/valkey/valkey.conf
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
networks:
- nexus-network
# --------------------------------------------------------------------------
# AGENTS (uncomment when ready to develop each service)
# --------------------------------------------------------------------------
# voice:
# build:
# context: ./services/voice-agent
# dockerfile: Dockerfile
# container_name: nexus-voice-agent
# restart: unless-stopped
# ports:
# - "8001:8001"
# environment:
# - DATABASE_URL=postgresql://nexus:${POSTGRES_PASSWORD:-nexus_dev_2026}@postgres:5432/nexus
# - REDIS_URL=redis://redis:6379/0
# - OPENAI_API_KEY=${OPENAI_API_KEY}
# volumes:
# - ./services/voice-agent:/app
# - ./shared:/app/shared
# - ./data:/app/data
# depends_on:
# postgres:
# condition: service_healthy
# redis:
# condition: service_healthy
# networks:
# - nexus-network
# language:
# build:
# context: ./services/language-agent
# dockerfile: Dockerfile
# container_name: nexus-language-agent
# restart: unless-stopped
# ports:
# - "8002:8002"
# environment:
# - DATABASE_URL=postgresql://nexus:${POSTGRES_PASSWORD:-nexus_dev_2026}@postgres:5432/nexus
# - REDIS_URL=redis://redis:6379/0
# - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
# volumes:
# - ./services/language-agent:/app
# - ./shared:/app/shared
# - ./data:/app/data
# depends_on:
# postgres:
# condition: service_healthy
# redis:
# condition: service_healthy
# networks:
# - nexus-network
# fusion:
# build:
# context: ./services/fusion-agent
# dockerfile: Dockerfile
# container_name: nexus-fusion-agent
# restart: unless-stopped
# ports:
# - "8003:8003"
# environment:
# - DATABASE_URL=postgresql://nexus:${POSTGRES_PASSWORD:-nexus_dev_2026}@postgres:5432/nexus
# - REDIS_URL=redis://redis:6379/0
# - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
# volumes:
# - ./services/fusion-agent:/app
# - ./shared:/app/shared
# - ./data:/app/data
# depends_on:
# postgres:
# condition: service_healthy
# redis:
# condition: service_healthy
# networks:
# - nexus-network
# api:
# build:
# context: ./services/api-gateway
# dockerfile: Dockerfile
# container_name: nexus-api-gateway
# restart: unless-stopped
# ports:
# - "8000:8000"
# environment:
# - DATABASE_URL=postgresql://nexus:${POSTGRES_PASSWORD:-nexus_dev_2026}@postgres:5432/nexus
# - REDIS_URL=redis://redis:6379/0
# volumes:
# - ./services/api-gateway:/app
# - ./shared:/app/shared
# - ./data:/app/data
# depends_on:
# postgres:
# condition: service_healthy
# redis:
# condition: service_healthy
# networks:
# - nexus-network
# --------------------------------------------------------------------------
# VOLUMES & NETWORKS
# --------------------------------------------------------------------------
volumes:
postgres_data:
driver: local
redis_data:
driver: local
networks:
nexus-network:
driver: bridge
name: nexus-network