-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
101 lines (96 loc) · 2.49 KB
/
docker-compose.test.yml
File metadata and controls
101 lines (96 loc) · 2.49 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
services:
test-postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: gate_test
POSTGRES_PASSWORD: gate_test
POSTGRES_DB: gate_test
ports:
- "15432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gate_test"]
interval: 2s
timeout: 5s
retries: 10
test-mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: gate_test
MYSQL_DATABASE: gate_test
MYSQL_USER: gate_test
MYSQL_PASSWORD: gate_test
ports:
- "13306:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "gate_test", "-pgate_test"]
interval: 2s
timeout: 5s
retries: 10
test-mongodb:
image: mongo:8.0
environment:
MONGO_INITDB_ROOT_USERNAME: gate_test
MONGO_INITDB_ROOT_PASSWORD: gate_test
MONGO_INITDB_DATABASE: gate_test
ports:
- "17017:27017"
healthcheck:
test:
[
"CMD-SHELL",
"mongosh --quiet --host localhost --port 27017 -u gate_test -p gate_test --authenticationDatabase admin --eval 'db.adminCommand({ ping: 1 }).ok' | grep 1",
]
interval: 2s
timeout: 5s
retries: 15
test-control-db:
image: postgres:16-alpine
environment:
POSTGRES_USER: gate_control
POSTGRES_PASSWORD: gate_control
POSTGRES_DB: gate_control
ports:
- "15433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gate_control"]
interval: 2s
timeout: 5s
retries: 10
gate-control:
profiles: ["stack"]
build:
context: .
target: control
environment:
GATE_DB_HOST: test-control-db
GATE_DB_USER: gate_control
GATE_DB_PASSWORD: gate_control
GATE_DB_NAME: gate_control
GATE_DB_PORT: "5432"
GATE_INSECURE: "true"
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://localhost:8080/health || exit 1"]
interval: 10s
timeout: 3s
retries: 5
depends_on:
test-control-db:
condition: service_healthy
gate-connector:
profiles: ["stack"]
build:
context: .
target: connector
environment:
UPSTREAM_PG_HOST: test-postgres
UPSTREAM_PG_DATABASE: gate_test
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://localhost:8081/health || exit 1"]
interval: 10s
timeout: 3s
retries: 5
depends_on:
gate-control:
condition: service_healthy
test-postgres:
condition: service_healthy