-
Notifications
You must be signed in to change notification settings - Fork 92
/
docker-compose.yml
39 lines (38 loc) · 1.11 KB
/
docker-compose.yml
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
version: '3.8'
services:
postgres_classic:
image: postgres:14
hostname: postgres
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
volumes:
- ./docker/postgres_classic/data/:/var/lib/postgresql/host/
- ./docker/postgres_classic/init/:/docker-entrypoint-initdb.d/
ports:
- "6001:5432"
postgres_scram:
image: postgres:14
hostname: postgres_scram
environment:
- POSTGRES_DB=postgres
- POSTGRES_HOST_AUTH_METHOD=scram-sha-256
- POSTGRES_INITDB_ARGS=--auth-host=scram-sha-256
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
volumes:
- ./docker/postgres_scram/data/:/var/lib/postgresql/host/
- ./docker/postgres_scram/init/:/docker-entrypoint-initdb.d/
ports:
- "6002:5432"
tests:
build: .
depends_on:
- postgres_classic
- postgres_scram
environment:
- WAIT_HOSTS=postgres_classic:5432,postgres_scram:5432
# Wait thirty seconds after database goes online
# For database metadata initialization
- WAIT_AFTER_HOSTS=15