Repository navigation
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
65 lines (62 loc) · 1.96 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
65 lines (62 loc) · 1.96 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
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: testdb
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- ./test/sql/init-postgres.sql:/docker-entrypoint-initdb.d/init.sql
tmpfs:
- /var/lib/postgresql/data
yugabytedb:
image: yugabytedb/yugabyte:2025.2.0.0-b131
command: |
bash -c "
(until /home/yugabyte/bin/ysqlsh -h localhost -p 5433 -U yugabyte -d yugabyte -c 'SELECT 1' > /dev/null 2>&1; do sleep 1; done && /home/yugabyte/bin/ysqlsh -h localhost -p 5433 -U yugabyte -d yugabyte -f /tmp/init.sql) &
rm -f /tmp/yb_data/yugabyted.pid &&
/home/yugabyte/bin/yugabyted start --daemon=false --base_dir=/tmp/yb_data --listen=0.0.0.0 --tserver_flags="pgsql_proxy_bind_address=0.0.0.0:5433,yb_num_shards_per_tserver=1"
"
ports:
- "5433:5433"
healthcheck:
test: ["CMD-SHELL", "/home/yugabyte/bin/ysqlsh -h localhost -p 5433 -U yugabyte -d yugabyte -c 'SELECT 1'"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- ./test/sql/init-yugabyte.sql:/tmp/init.sql
- yb_data_volume:/tmp/yb_data
twinkly-tests:
build:
context: .
dockerfile: test/Dockerfile.integration
depends_on:
postgres:
condition: service_healthy
yugabytedb:
condition: service_healthy
environment:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
YUGABYTE_HOST: yugabytedb
YUGABYTE_PORT: 5433
YUGABYTE_USER: yugabyte
YUGABYTE_DB: testdb
volumes:
- .:/app
working_dir: /app
command: ["go", "test", "-v", "-run", "TestProxy", "./test/integration/..."]
volumes:
yb_data_volume: