Repository navigation
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
106 lines (101 loc) · 2.67 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
106 lines (101 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
100
101
102
103
104
105
106
services:
postgres15:
image: postgres:15-alpine
container_name: dzban-test-pg15
environment:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
ports:
- "5415:5432"
volumes:
- ./crates/dzban-db/tests/fixtures/init-pg15.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 2s
timeout: 3s
retries: 15
networks:
- dzban-test
postgres16:
image: postgres:16-alpine
container_name: dzban-test-pg16
environment:
POSTGRES_USER: user16
POSTGRES_PASSWORD: pass16
POSTGRES_DB: proddb
ports:
- "5416:5432"
volumes:
- ./crates/dzban-db/tests/fixtures/init-pg16.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user16 -d proddb"]
interval: 2s
timeout: 3s
retries: 15
networks:
- dzban-test
postgres17:
image: postgres:17-alpine
container_name: dzban-test-pg17
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: secret
POSTGRES_DB: devdb
ports:
- "5417:5432"
volumes:
- ./crates/dzban-db/tests/fixtures/init-pg17.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d devdb"]
interval: 2s
timeout: 3s
retries: 15
networks:
- dzban-test
postgres-slow:
image: postgres:15-alpine
container_name: dzban-test-slow
environment:
POSTGRES_USER: slowuser
POSTGRES_PASSWORD: slowpass
POSTGRES_DB: slowdb
ports:
- "5418:5432"
command: >
postgres
-c statement_timeout=30000
-c log_statement=all
healthcheck:
test: ["CMD-SHELL", "pg_isready -U slowuser -d slowdb"]
interval: 2s
timeout: 3s
retries: 15
networks:
- dzban-test
clickhouse:
image: clickhouse/clickhouse-server:25.8-alpine
container_name: dzban-test-clickhouse
environment:
CLICKHOUSE_USER: dzban
CLICKHOUSE_PASSWORD: dzban-test
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
CLICKHOUSE_DB: dzban_test
ports:
- "58123:8123"
volumes:
- ./crates/dzban-db/tests/fixtures/init-clickhouse.sql:/docker-entrypoint-initdb.d/init.sql:ro
healthcheck:
test:
[
"CMD-SHELL",
"wget -qO- -T 2 'http://'\"$$(hostname -i)\"':8123/?user=dzban&password=dzban-test&database=dzban_test&query=SELECT%20count()%20FROM%20events' | grep -qx 3",
]
interval: 2s
timeout: 3s
retries: 15
networks:
- dzban-test
networks:
dzban-test:
driver: bridge