-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.llm-patch.yml
More file actions
156 lines (148 loc) · 3.67 KB
/
docker-compose.llm-patch.yml
File metadata and controls
156 lines (148 loc) · 3.67 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
version: '3.8'
services:
# PostgreSQL database for LLM Patch Service
llm-patch-db:
image: postgres:15-alpine
container_name: soroban-llm-patch-db
environment:
POSTGRES_DB: llm_patch_service
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5433:5432"
volumes:
- llm_patch_data:/var/lib/postgresql/data
networks:
- soroban-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# Redis for caching
redis:
image: redis:7-alpine
container_name: soroban-redis
ports:
- "6380:6379"
volumes:
- redis_data:/data
networks:
- soroban-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# LLM Patch Service
llm-patch-service:
build:
context: ./llm-patch-service
dockerfile: Dockerfile
container_name: soroban-llm-patch-service
environment:
SERVICE_HOST: 0.0.0.0
SERVICE_PORT: 8080
DATABASE_URL: postgresql://postgres:postgres@llm-patch-db:5432/llm_patch_service
DB_MAX_CONNECTIONS: 10
LLM_PROVIDER: ${LLM_PROVIDER:-openai}
LLM_API_KEY: ${LLM_API_KEY}
LLM_MODEL: ${LLM_MODEL:-gpt-4}
LLM_MAX_TOKENS: 2000
LLM_TEMPERATURE: 0.3
RUST_LOG: llm_patch_service=info,tower_http=info
MIN_CONFIDENCE_THRESHOLD: 0.4
ENABLE_SANITIZATION: true
ENABLE_VERIFICATION: true
ports:
- "8080:8080"
depends_on:
llm-patch-db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- soroban-network
volumes:
- /var/run/docker.sock:/var/run/docker.sock # For compilation sandbox
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Backend API (updated to include LLM Patch integration)
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: soroban-backend
environment:
NODE_ENV: development
PORT: 3000
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/soroban_scanner
REDIS_URL: redis://redis:6379
JWT_SECRET: your-jwt-secret-key
LLM_PATCH_SERVICE_URL: http://llm-patch-service:8080
LLM_PATCH_SERVICE_API_KEY: ${LLM_PATCH_SERVICE_API_KEY:-}
ports:
- "3000:3000"
depends_on:
- postgres
- redis
- llm-patch-service
networks:
- soroban-network
volumes:
- ./backend:/app
- /app/node_modules
restart: unless-stopped
# Core Scanner Service
core-scanner:
build:
context: ./core-scanner
dockerfile: Dockerfile
container_name: soroban-core-scanner
environment:
RUST_LOG: info
REDIS_URL: redis://redis:6379
ports:
- "8081:8080"
depends_on:
- redis
networks:
- soroban-network
restart: unless-stopped
# Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: soroban-frontend
environment:
NEXT_PUBLIC_API_URL: http://localhost:3000
NEXT_PUBLIC_LLM_PATCH_URL: http://localhost:8080
ports:
- "3001:3000"
depends_on:
- backend
- llm-patch-service
networks:
- soroban-network
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
restart: unless-stopped
volumes:
llm_patch_data:
driver: local
redis_data:
driver: local
networks:
soroban-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16