-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (93 loc) · 2.67 KB
/
docker-compose.yml
File metadata and controls
99 lines (93 loc) · 2.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
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: sidemantic_test
ports:
- "5433:5432" # Use 5433 to avoid conflicts with local Postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U test"]
interval: 2s
timeout: 5s
retries: 10
volumes:
- postgres_data:/var/lib/postgresql/data
bigquery:
image: ghcr.io/goccy/bigquery-emulator:latest
platform: linux/amd64
ports:
- "9050:9050"
command: ["--project=test-project", "--dataset=test_dataset"]
# Snowflake tests use fakesnow (Python library) for mocking, no Docker service needed
# Databricks tests require real Databricks workspace - no emulator available
spark:
image: apache/spark:3.5.0
platform: linux/amd64
ports:
- "10000:10000" # Thrift server
- "4040:4040" # Spark UI
environment:
SPARK_NO_DAEMONIZE: "true"
command: >
/bin/bash -c "
/opt/spark/sbin/start-thriftserver.sh &&
tail -f /opt/spark/logs/*
"
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "10000"]
interval: 5s
timeout: 5s
retries: 20
clickhouse:
image: clickhouse/clickhouse-server:latest
platform: linux/amd64
ports:
- "8123:8123" # HTTP interface
- "9000:9000" # Native protocol (optional)
environment:
CLICKHOUSE_DB: default
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: clickhouse
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
ulimits:
nofile:
soft: 262144
hard: 262144
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "localhost:8123/ping"]
interval: 2s
timeout: 5s
retries: 10
test:
build:
context: .
dockerfile: Dockerfile.test
depends_on:
postgres:
condition: service_healthy
bigquery:
condition: service_started
clickhouse:
condition: service_healthy
environment:
POSTGRES_TEST: "1"
POSTGRES_URL: "postgres://test:test@postgres:5432/sidemantic_test"
POSTGRES_HOST: "postgres"
POSTGRES_PORT: "5432"
POSTGRES_DB: "sidemantic_test"
POSTGRES_USER: "test"
POSTGRES_PASSWORD: "test"
BIGQUERY_TEST: "1"
BIGQUERY_EMULATOR_HOST: "bigquery:9050"
BIGQUERY_PROJECT: "test-project"
BIGQUERY_DATASET: "test_dataset"
SNOWFLAKE_TEST: "1" # fakesnow patches snowflake.connector, no external service needed
CLICKHOUSE_TEST: "1"
CLICKHOUSE_HOST: "clickhouse"
CLICKHOUSE_PORT: "8123"
CLICKHOUSE_PASSWORD: "clickhouse"
command: pytest -m integration -v
volumes:
postgres_data: