-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (106 loc) · 2.55 KB
/
Copy pathdocker-compose.yml
File metadata and controls
111 lines (106 loc) · 2.55 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
version: "3.9"
#
# Code Analyzer — Docker Compose Configuration
#
services:
#
# MCP Server — serves the MCP protocol over HTTP/SSE transport
#
code-analyzer-mcp:
build:
context: .
dockerfile: Dockerfile
target: runner
image: code-analyzer-mcp:latest
container_name: code-analyzer-mcp
environment:
NODE_ENV: production
# API key authentication for MCP clients
MCP_API_KEY: ${MCP_API_KEY:-}
# Optional: log level (debug, info, warn, error)
LOG_LEVEL: ${LOG_LEVEL:-info}
# Optional: transport mode (stdio, sse)
MCP_TRANSPORT: ${MCP_TRANSPORT:-sse}
ports:
- "3000:3000"
volumes:
# Mount project directory for live code analysis
- .:/workspace:ro
# Persistent volume for the code graph storage
- graph-data:/app/data/graph
networks:
- analyzer-net
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
deploy:
resources:
limits:
cpus: "2"
memory: 2G
reservations:
cpus: "0.5"
memory: 512M
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp
#
# Server — HTTP REST API server
#
code-analyzer-server:
build:
context: .
dockerfile: Dockerfile
target: runner
image: code-analyzer-server:latest
container_name: code-analyzer-server
command: ["node", "packages/server/dist/start.js"]
environment:
NODE_ENV: production
SERVER_API_KEY: ${SERVER_API_KEY:-}
LOG_LEVEL: ${LOG_LEVEL:-info}
PORT: "3001"
ports:
- "3001:3001"
volumes:
- .:/workspace:ro
- graph-data:/app/data/graph
networks:
- analyzer-net
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
deploy:
resources:
limits:
cpus: "2"
memory: 2G
reservations:
cpus: "0.5"
memory: 512M
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp
depends_on:
code-analyzer-mcp:
condition: service_healthy
networks:
analyzer-net:
driver: bridge
name: code-analyzer-net
volumes:
graph-data:
driver: local
name: code-analyzer-graph-data