/
docker-compose.yml
35 lines (34 loc) · 1 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
version: '3.8'
services:
postgres:
image: postgres
hostname: postgres
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
volumes:
- ./docker/postgres/data/:/var/lib/postgresql/host/
- ./docker/postgres/init/:/docker-entrypoint-initdb.d/
postgres_scram:
image: postgres
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/
tests:
build: .
depends_on:
- postgres
- postgres_scram
environment:
- WAIT_HOSTS=postgres:5432,postgres_scram:5432
# Wait thirty seconds after database goes online
# For database metadata initialization
- WAIT_AFTER_HOSTS=15