-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
62 lines (57 loc) · 2.53 KB
/
docker-compose.test.yml
File metadata and controls
62 lines (57 loc) · 2.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
version: '3.8'
# ─────────────────────────────────────────────
# preLLM — Docker Test Sandbox
# ─────────────────────────────────────────────
# Usage:
# docker-compose -f docker-compose.test.yml run --rm test
# docker-compose -f docker-compose.test.yml run --rm lint
# docker-compose -f docker-compose.test.yml run --rm build-check
services:
# ─────────────────────────────────────────────
# Run full test suite
# ─────────────────────────────────────────────
test:
build:
context: .
dockerfile: Dockerfile.test
command: python -m pytest tests/ -v --cov=prellm --cov-report=term
volumes:
- .:/app
working_dir: /app
# ─────────────────────────────────────────────
# Lint check
# ─────────────────────────────────────────────
lint:
build:
context: .
dockerfile: Dockerfile.test
command: ruff check .
volumes:
- .:/app
working_dir: /app
# ─────────────────────────────────────────────
# Build check — verify production image builds
# ─────────────────────────────────────────────
build-check:
build:
context: .
dockerfile: Dockerfile
command: ["--help"]
# ─────────────────────────────────────────────
# Server smoke test
# ─────────────────────────────────────────────
server-smoke:
build:
context: .
dockerfile: Dockerfile
ports:
- "18080:8080"
environment:
- SMALL_MODEL=ollama/qwen2.5:3b
- LARGE_MODEL=gpt-4o-mini
command: ["serve", "--host", "0.0.0.0", "--port", "8080"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 5s
timeout: 5s
retries: 3