-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test-FullStack.yml
More file actions
73 lines (67 loc) · 2.42 KB
/
Copy pathdocker-compose.test-FullStack.yml
File metadata and controls
73 lines (67 loc) · 2.42 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
version: '3.8'
services:
# Backend test service (FullStack - with full Marker ML dependencies)
backend-test-fullstack:
build:
context: ./backend
dockerfile: Dockerfile.test-FullStack
volumes:
- ./backend:/app:ro # Read-only to prevent accidental modifications
- ./shared/uploads:/app/uploads
- ./shared/outputs:/app/outputs
- ./tests:/tests:ro # Mount tests directory (includes backend/file-to-parse)
# Persist ML model cache across test runs (IMPORTANT: massive speedup!)
- marker_models_cache:/root/.cache
working_dir: /tests
environment:
- PYTHONPATH=/app
- ENVIRONMENT=test
- LOG_LEVEL=DEBUG
- MARKER_DEBUG_LOGS=1
- UPLOAD_DIR=/app/uploads
- OUTPUT_DIR=/app/outputs
- API_BASE_URL=${API_BASE_URL:-http://host.docker.internal:8000}
# Marker cache configuration - using /root/.cache (writable, persisted volume)
- SURYA_CACHE_DIR=/root/.cache/surya
- MARKER_CACHE_DIR=/root/.cache/marker
- HF_HOME=/root/.cache/huggingface
- TORCH_HOME=/root/.cache/torch
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- marker-test-network
# Override command to run custom test script
command: >
bash -c "
echo '========================================';
echo 'Marker FullStack Test Environment';
echo '========================================';
echo '';
echo 'Available commands:';
echo ' python3 /tests/local/test_marker_logs.py - Test Marker logs with exemple_facture.pdf';
echo ' pytest /tests/backend/FullStack/ -v - Run FullStack backend tests';
echo ' pytest /tests/backend/modelFree/ -v - Run modelFree backend tests';
echo ' bash - Interactive shell';
echo '';
echo 'Waiting for commands...';
tail -f /dev/null
"
# Redis service for job status tracking (optional, for API-like testing)
redis-test:
image: redis:7-alpine
ports:
- "6379:6379"
networks:
- marker-test-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
networks:
marker-test-network:
driver: bridge
volumes:
test_uploads:
test_outputs:
marker_models_cache: # Persistent volume for Marker ML models (avoids re-downloading on every test)