-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
43 lines (40 loc) · 1.19 KB
/
docker-compose.test.yml
File metadata and controls
43 lines (40 loc) · 1.19 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
# Minimal Compose file for running integration tests locally and in CI.
# Uses tmpfs for RAM-backed databases (fast, data discarded on stop).
# Uses a separate project name and ports so dev containers are never affected.
# See: .specs/infrastructure/ci-cd.md §11.3
#
# Usage:
# docker compose -f docker-compose.test.yml up -d
# npm run test:integration
# docker compose -f docker-compose.test.yml down
name: yavio-test
services:
postgres:
image: postgres:16
environment:
POSTGRES_DB: yavio_test
POSTGRES_USER: yavio_service
POSTGRES_PASSWORD: test
ports:
- "${TEST_POSTGRES_PORT:-5433}:5432"
tmpfs:
- /var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U yavio_service"]
interval: 3s
timeout: 3s
retries: 5
clickhouse:
image: clickhouse/clickhouse-server:24.3
environment:
CLICKHOUSE_PASSWORD: test
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
ports:
- "${TEST_CLICKHOUSE_PORT:-8124}:8123"
tmpfs:
- /var/lib/clickhouse
healthcheck:
test: ["CMD", "clickhouse-client", "--password", "test", "--query", "SELECT 1"]
interval: 3s
timeout: 3s
retries: 5