Skip to content

Commit 965dab6

Browse files
committed
update with eval docker compose
1 parent cac4a4b commit 965dab6

File tree

5 files changed

+296
-6
lines changed

5 files changed

+296
-6
lines changed

.github/workflows/deepeval-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- 'src/**'
99
- 'tests/**'
1010
- 'data/**'
11-
- 'docker-compose-test.yml'
11+
- 'docker-compose-eval.yml'
1212
- 'Dockerfile.llm_orchestration_service'
1313
- '.github/workflows/deepeval-tests.yml'
1414

@@ -299,5 +299,5 @@ jobs:
299299
- name: Cleanup Docker resources
300300
if: always()
301301
run: |
302-
docker compose -f docker-compose-test.yml down -v --remove-orphans || true
302+
docker compose -f docker-compose-eval.yml down -v --remove-orphans || true
303303
docker system prune -f || true

.github/workflows/deepteam-red-team-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- 'src/**'
88
- 'tests/**'
99
- 'data/**'
10-
- 'docker-compose-test.yml'
10+
- 'docker-compose-eval.yml'
1111
- 'Dockerfile.llm_orchestration_service'
1212
- '.github/workflows/deepeval-red-team-tests.yml'
1313
workflow_dispatch:
@@ -336,5 +336,5 @@ jobs:
336336
- name: Cleanup Docker resources
337337
if: always()
338338
run: |
339-
docker compose -f docker-compose-test.yml down -v --remove-orphans || true
339+
docker compose -f docker-compose-eval.yml down -v --remove-orphans || true
340340
docker system prune -f || true

.gitleaks.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[allowlist]
22
paths = [
3-
'''docker-compose-test\.yml'''
3+
'''docker-compose-eval\.yml'''
44
]

docker-compose-eval.yml

Lines changed: 290 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,290 @@
1+
services:
2+
# === Core Infrastructure ===
3+
4+
# Shared PostgreSQL database (used by both application and Langfuse)
5+
rag_search_db:
6+
image: postgres:14.1
7+
container_name: rag_search_db
8+
restart: always
9+
environment:
10+
POSTGRES_USER: postgres
11+
POSTGRES_PASSWORD: dbadmin
12+
POSTGRES_DB: rag-search
13+
volumes:
14+
- test_rag_search_db:/var/lib/postgresql/data
15+
ports:
16+
- "5436:5432"
17+
networks:
18+
- test-network
19+
20+
# Vector database for RAG
21+
qdrant:
22+
image: qdrant/qdrant:v1.15.1
23+
container_name: qdrant
24+
restart: always
25+
ports:
26+
- "6333:6333"
27+
- "6334:6334"
28+
volumes:
29+
- test_qdrant_data:/qdrant/storage
30+
networks:
31+
- test-network
32+
33+
# === Secret Management ===
34+
35+
# Vault - Secret management (dev mode)
36+
vault:
37+
image: hashicorp/vault:1.20.3
38+
container_name: vault
39+
cap_add:
40+
- IPC_LOCK
41+
ports:
42+
- "8200:8200"
43+
environment:
44+
VAULT_DEV_ROOT_TOKEN_ID: root
45+
VAULT_ADDR: http://0.0.0.0:8200
46+
VAULT_API_ADDR: http://0.0.0.0:8200
47+
command: server -dev -dev-listen-address=0.0.0.0:8200
48+
networks:
49+
- test-network
50+
51+
# Vault Agent - Automatic token management via AppRole
52+
vault-agent-llm:
53+
image: hashicorp/vault:1.20.3
54+
container_name: vault-agent-llm
55+
depends_on:
56+
- vault
57+
volumes:
58+
- ./test-vault/agents/llm:/agent/in
59+
- ./test-vault/agent-out:/agent/out
60+
entrypoint: ["sh", "-c"]
61+
command:
62+
- |
63+
# Wait for Vault to be ready
64+
sleep 5
65+
echo "Waiting for AppRole credentials..."
66+
while [ ! -f /agent/in/role_id ] || [ ! -s /agent/in/role_id ]; do
67+
sleep 1
68+
done
69+
while [ ! -f /agent/in/secret_id ] || [ ! -s /agent/in/secret_id ]; do
70+
sleep 1
71+
done
72+
echo "Credentials found, starting Vault Agent..."
73+
exec vault agent -config=/agent/in/agent.hcl -log-level=debug
74+
networks:
75+
- test-network
76+
77+
# === Langfuse Observability Stack ===
78+
79+
# Redis - Queue and cache for Langfuse
80+
redis:
81+
image: redis:7
82+
container_name: redis
83+
restart: always
84+
command: --requirepass myredissecret
85+
ports:
86+
- "127.0.0.1:6379:6379"
87+
networks:
88+
- test-network
89+
90+
# MinIO - S3-compatible storage for Langfuse
91+
minio:
92+
image: minio/minio:latest
93+
container_name: minio
94+
restart: always
95+
entrypoint: sh
96+
command: -c "mkdir -p /data/langfuse && minio server /data --address ':9000' --console-address ':9001'"
97+
environment:
98+
MINIO_ROOT_USER: minio
99+
MINIO_ROOT_PASSWORD: miniosecret
100+
ports:
101+
- "9090:9000"
102+
- "127.0.0.1:9091:9001"
103+
volumes:
104+
- test_minio_data:/data
105+
networks:
106+
- test-network
107+
108+
# ClickHouse - Analytics database for Langfuse (REQUIRED in v3)
109+
clickhouse:
110+
image: clickhouse/clickhouse-server:24.3
111+
container_name: clickhouse
112+
restart: always
113+
environment:
114+
CLICKHOUSE_DB: default
115+
CLICKHOUSE_USER: default
116+
CLICKHOUSE_PASSWORD: clickhouse
117+
volumes:
118+
- test_clickhouse_data:/var/lib/clickhouse
119+
ports:
120+
- "127.0.0.1:8123:8123"
121+
- "127.0.0.1:9000:9000"
122+
networks:
123+
- test-network
124+
ulimits:
125+
nofile:
126+
soft: 262144
127+
hard: 262144
128+
129+
# Langfuse Worker - Background job processor
130+
langfuse-worker:
131+
image: langfuse/langfuse-worker:3
132+
container_name: langfuse-worker
133+
restart: always
134+
depends_on:
135+
- rag_search_db
136+
- minio
137+
- redis
138+
- clickhouse
139+
ports:
140+
- "127.0.0.1:3030:3030"
141+
environment:
142+
# Database
143+
DATABASE_URL: postgresql://postgres:dbadmin@rag_search_db:5432/rag-search
144+
145+
# Auth & Security (TEST VALUES ONLY - NOT FOR PRODUCTION)
146+
# gitleaks:allow - These are test-only hex strings
147+
NEXTAUTH_URL: http://localhost:3000
148+
SALT: ef9d6c6f8b4a5e2c1d3f7a9b8c5e4d2a1f6b8c9d4e5f7a8b1c2d3e4f5a6b7c8d
149+
ENCRYPTION_KEY: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b
150+
151+
# Features
152+
TELEMETRY_ENABLED: "false"
153+
LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES: "false"
154+
155+
# ClickHouse (REQUIRED for Langfuse v3)
156+
CLICKHOUSE_MIGRATION_URL: clickhouse://clickhouse:9000/default
157+
CLICKHOUSE_URL: http://clickhouse:8123
158+
CLICKHOUSE_USER: default
159+
CLICKHOUSE_PASSWORD: clickhouse
160+
CLICKHOUSE_CLUSTER_ENABLED: "false"
161+
162+
# S3/MinIO Event Upload
163+
LANGFUSE_S3_EVENT_UPLOAD_BUCKET: langfuse
164+
LANGFUSE_S3_EVENT_UPLOAD_REGION: us-east-1
165+
LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID: minio
166+
LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY: miniosecret
167+
LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT: http://minio:9000
168+
LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE: "true"
169+
170+
# S3/MinIO Media Upload
171+
LANGFUSE_S3_MEDIA_UPLOAD_BUCKET: langfuse
172+
LANGFUSE_S3_MEDIA_UPLOAD_REGION: us-east-1
173+
LANGFUSE_S3_MEDIA_UPLOAD_ACCESS_KEY_ID: minio
174+
LANGFUSE_S3_MEDIA_UPLOAD_SECRET_ACCESS_KEY: miniosecret
175+
LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT: http://minio:9000
176+
LANGFUSE_S3_MEDIA_UPLOAD_FORCE_PATH_STYLE: "true"
177+
178+
# Redis
179+
REDIS_HOST: redis
180+
REDIS_PORT: "6379"
181+
REDIS_AUTH: myredissecret
182+
networks:
183+
- test-network
184+
185+
# Langfuse Web - UI and API
186+
langfuse-web:
187+
image: langfuse/langfuse:3
188+
container_name: langfuse-web
189+
restart: always
190+
depends_on:
191+
- langfuse-worker
192+
- rag_search_db
193+
- clickhouse
194+
ports:
195+
- "3000:3000"
196+
environment:
197+
# Database
198+
DATABASE_URL: postgresql://postgres:dbadmin@rag_search_db:5432/rag-search
199+
200+
# Auth & Security (TEST VALUES ONLY - NOT FOR PRODUCTION)
201+
# gitleaks:allow - These are test-only hex strings
202+
NEXTAUTH_URL: http://localhost:3000
203+
NEXTAUTH_SECRET: 9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e
204+
SALT: ef9d6c6f8b4a5e2c1d3f7a9b8c5e4d2a1f6b8c9d4e5f7a8b1c2d3e4f5a6b7c8d
205+
ENCRYPTION_KEY: 1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b
206+
207+
# Features
208+
TELEMETRY_ENABLED: "false"
209+
LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES: "false"
210+
211+
# ClickHouse (REQUIRED for Langfuse v3)
212+
CLICKHOUSE_MIGRATION_URL: clickhouse://clickhouse:9000/default
213+
CLICKHOUSE_URL: http://clickhouse:8123
214+
CLICKHOUSE_USER: default
215+
CLICKHOUSE_PASSWORD: clickhouse
216+
CLICKHOUSE_CLUSTER_ENABLED: "false"
217+
218+
# S3/MinIO Event Upload
219+
LANGFUSE_S3_EVENT_UPLOAD_BUCKET: langfuse
220+
LANGFUSE_S3_EVENT_UPLOAD_REGION: us-east-1
221+
LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID: minio
222+
LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY: miniosecret
223+
LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT: http://minio:9000
224+
LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE: "true"
225+
226+
# S3/MinIO Media Upload
227+
LANGFUSE_S3_MEDIA_UPLOAD_BUCKET: langfuse
228+
LANGFUSE_S3_MEDIA_UPLOAD_REGION: us-east-1
229+
LANGFUSE_S3_MEDIA_UPLOAD_ACCESS_KEY_ID: minio
230+
LANGFUSE_S3_MEDIA_UPLOAD_SECRET_ACCESS_KEY: miniosecret
231+
LANGFUSE_S3_MEDIA_UPLOAD_ENDPOINT: http://minio:9000
232+
LANGFUSE_S3_MEDIA_UPLOAD_FORCE_PATH_STYLE: "true"
233+
234+
# Redis
235+
REDIS_HOST: redis
236+
REDIS_PORT: "6379"
237+
REDIS_AUTH: myredissecret
238+
239+
# Initialize test project with known credentials
240+
LANGFUSE_INIT_PROJECT_PUBLIC_KEY: pk-lf-test
241+
LANGFUSE_INIT_PROJECT_SECRET_KEY: sk-lf-test
242+
networks:
243+
- test-network
244+
245+
# === LLM Orchestration Service ===
246+
247+
llm-orchestration-service:
248+
build:
249+
context: .
250+
dockerfile: Dockerfile.llm_orchestration_service
251+
container_name: llm-orchestration-service
252+
restart: always
253+
ports:
254+
- "8100:8100"
255+
environment:
256+
- VAULT_ADDR=http://vault:8200
257+
- VAULT_TOKEN_FILE=/agent/out/token
258+
- QDRANT_URL=http://qdrant:6333
259+
- EVAL_MODE=true
260+
volumes:
261+
- ./src/llm_config_module/config:/app/src/llm_config_module/config:ro
262+
- ./test-vault/agent-out:/agent/out:ro
263+
- test_llm_orchestration_logs:/app/logs
264+
depends_on:
265+
- qdrant
266+
- langfuse-web
267+
- vault-agent-llm
268+
networks:
269+
- test-network
270+
271+
# === Networks ===
272+
273+
networks:
274+
test-network:
275+
name: test-network
276+
driver: bridge
277+
278+
# === Volumes ===
279+
280+
volumes:
281+
test_rag_search_db:
282+
name: test_rag_search_db
283+
test_qdrant_data:
284+
name: test_qdrant_data
285+
test_minio_data:
286+
name: test_minio_data
287+
test_clickhouse_data:
288+
name: test_clickhouse_data
289+
test_llm_orchestration_logs:
290+
name: test_llm_orchestration_logs

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def get_secret(self, path: str) -> dict:
129129
class RAGStackTestContainers:
130130
"""Manages test containers for RAG stack including Vault, Qdrant, Langfuse, and LLM orchestration service"""
131131

132-
def __init__(self, compose_file_name: str = "docker-compose-test.yml"):
132+
def __init__(self, compose_file_name: str = "docker-compose-eval.yml"):
133133
self.project_root = Path(__file__).parent.parent
134134
self.compose_file_path = self.project_root / compose_file_name
135135
self.compose: Optional[DockerCompose] = None

0 commit comments

Comments
 (0)