-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
220 lines (211 loc) · 6.12 KB
/
Copy pathdocker-compose.yml
File metadata and controls
220 lines (211 loc) · 6.12 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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: bugtraceai-web-db
environment:
POSTGRES_USER: ${POSTGRES_USER:-bugtraceai}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-bugtraceai_dev_2026}
POSTGRES_DB: ${POSTGRES_DB:-bugtraceai_web}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend/init-scripts:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-bugtraceai}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
ports:
- "${POSTGRES_PORT:-5432}:5432"
networks:
- bugtraceai-network
# Express/Prisma Backend
backend:
build:
context: .
dockerfile: backend/Dockerfile
network: host
container_name: bugtraceai-web-backend
environment:
NODE_ENV: production
PORT: 3001
DATABASE_URL: postgresql://${POSTGRES_USER:-bugtraceai}:${POSTGRES_PASSWORD:-bugtraceai_dev_2026}@postgres:5432/${POSTGRES_DB:-bugtraceai_web}?schema=public
FRONTEND_URL: http://localhost:${FRONTEND_PORT:-6869}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
networks:
- bugtraceai-network
# Vite/React Frontend (nginx)
frontend:
build:
context: .
dockerfile: Dockerfile
network: host
args:
VITE_API_URL: /api
VITE_CLI_API_URL: ${VITE_CLI_API_URL:-/cli-api}
container_name: bugtraceai-web-frontend
ports:
- "${FRONTEND_PORT:-6869}:80"
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
networks:
- bugtraceai-network
# API Discovery (Kiterunner) — core WEB feature, always runs
api-routes:
build:
context: ./api-routes-mcp
dockerfile: Dockerfile
network: host
container_name: bugtraceai-api-routes
command: ["mcp", "--sse"]
environment:
- KR_BIN=/usr/local/bin/kr
- WORDLISTS_DIR=/opt/kiterunner/wordlists
- MCP_PORT=8003
- API_PORT=8004
healthcheck:
test: ["CMD", "curl", "-sf", "--max-time", "2", "http://localhost:8004/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
restart: unless-stopped
expose:
- "8003"
- "8004"
networks:
- bugtraceai-network
# ============================================
# MCP Security Agents (optional, chat extras)
# ============================================
# Kali Linux MCP Server - Security tools container
# Start manually: docker-compose up -d kali-mcp
kali-mcp:
image: kalilinux/kali-rolling:latest
container_name: kali-mcp-server
profiles:
- kali
- all-agents
stdin_open: true
tty: true
volumes:
- kali-data:/root/data
- /tmp/.X11-unix:/tmp/.X11-unix
environment:
- DISPLAY=${DISPLAY:-}
cap_add:
- NET_ADMIN
security_opt:
- seccomp:unconfined
command: ["bash", "-c", "apt-get update && apt-get install -y nmap ffuf nuclei sqlmap dirb gobuster nikto hydra john hashcat curl wget netcat-traditional python3 python3-pip git vim && echo 'Kali MCP Server ready!' && tail -f /dev/null"]
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
networks:
- bugtraceai-network
# reconFTW MCP Server - Automated reconnaissance container
# Start manually: docker-compose up -d reconftw-mcp
reconftw-mcp:
build:
context: ../reconftw-mcp
dockerfile: Dockerfile
container_name: reconftw-mcp
profiles:
- recon
- all-agents
command: ["mcp", "--sse"]
ports:
- "${RECON_MCP_PORT:-8002}:8002"
volumes:
- reconftw-output:/opt/reconftw/output
- reconftw-config:/root/.config/reconftw
environment:
- RECONFTW_DIR=/root/reconftw
- OUTPUT_DIR=/opt/reconftw/output
- MCP_PORT=8002
- SSE_MODE=${RECON_SSE_MODE:-false}
# API Keys (pass from .env or host environment)
- SHODAN_API_KEY=${SHODAN_API_KEY:-}
- VIRUSTOTAL_API_KEY=${VIRUSTOTAL_API_KEY:-}
- CENSYS_API_ID=${CENSYS_API_ID:-}
- CENSYS_API_SECRET=${CENSYS_API_SECRET:-}
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
cap_add:
- NET_ADMIN
security_opt:
- seccomp:unconfined
healthcheck:
test: ["CMD-SHELL", "curl -sS -m 2 http://localhost:8002/sse >/dev/null; res=$$?; [ $$res -eq 0 ] || [ $$res -eq 28 ] || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: unless-stopped
networks:
- bugtraceai-network
# BugTraceAI-CLI MCP Server - Local scanner integration
# Start manually: docker-compose up -d bugtrace-cli-mcp
bugtrace-cli-mcp:
build:
context: ../BugTraceAI-CLI
dockerfile: Dockerfile.mcp
container_name: bugtrace-cli-mcp
profiles:
- cli
- all-agents
ports:
- "${CLI_MCP_PORT:-8001}:8001"
volumes:
- cli-scans:/app/scans
- cli-reports:/app/reports
environment:
- MCP_PORT=8001
- SSE_MODE=${CLI_SSE_MODE:-false}
healthcheck:
test: ["CMD-SHELL", "curl -sS -m 2 http://localhost:8001/sse >/dev/null; res=$$?; [ $$res -eq 0 ] || [ $$res -eq 28 ] || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
networks:
- bugtraceai-network
volumes:
postgres_data:
name: bugtraceai_web_postgres_data
driver: local
kali-data:
name: bugtraceai_kali_data
driver: local
reconftw-output:
name: bugtraceai_reconftw_output
driver: local
reconftw-config:
name: bugtraceai_reconftw_config
driver: local
cli-scans:
name: bugtraceai_cli_scans
driver: local
cli-reports:
name: bugtraceai_cli_reports
driver: local
networks:
bugtraceai-network:
name: bugtraceai-web-network
driver: bridge