Repository navigation
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
66 lines (62 loc) · 2.15 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
66 lines (62 loc) · 2.15 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
version: '3.8'
# Explicit project name: keeps this stack's containers/networks fully
# isolated from docker-compose.yml's "minilake" project. Without this, both
# files share the same directory-inferred project name ("minilake"), and
# running this file's `up`/`down` can affect (or, with --remove-orphans,
# delete) the unrelated dev container from docker-compose.yml.
name: minilake-test
services:
# Service for E2E tests (runs minilake)
minilake-test-server:
build:
context: .
dockerfile: Dockerfile
container_name: minilake-test-server
ports:
- "8123:8000"
environment:
MINILAKE_DATA_DIR: /data
MINILAKE_HOST: 0.0.0.0
MINILAKE_PORT: 8000
MINILAKE_DOCKER_VOLUME: minilake_test_data
MINILAKE_SPARK_IMAGE: apache/spark:3.5.3-scala2.12-java17-python3-ubuntu
MINILAKE_CLUSTER_START_DELAY: "0.3"
MINILAKE_CLUSTER_TERMINATE_DELAY: "0.2"
# MCP server on /mcp, for tests/mcp_server/. The allowed-hosts default (empty)
# disables DNS-rebinding protection, which is required here: the test runner reaches
# the server as `minilake-test-server:8000`, a Host the SDK's loopback-only default
# allowlist would reject with 421 before any tool ran.
MINILAKE_MCP: "1"
volumes:
- minilake_test_data:/data
# Docker socket: lets minilake spawn sibling containers to run job tasks with real Spark.
- /var/run/docker.sock:/var/run/docker.sock
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/_minilake/health"]
interval: 2s
timeout: 3s
retries: 30
start_period: 5s
# Run unit tests + integration tests
test-runner:
build:
context: .
dockerfile: Dockerfile.test
container_name: minilake-test-runner
depends_on:
minilake-test-server:
condition: service_healthy
environment:
MINILAKE_DATA_DIR: /data
PYTHONUNBUFFERED: 1
volumes:
- .:/opt/minilake
- minilake_test_data:/data
- test_reports:/opt/minilake/htmlcov
working_dir: /opt/minilake
volumes:
minilake_test_data:
name: minilake_test_data
driver: local
test_reports:
driver: local