-
Notifications
You must be signed in to change notification settings - Fork 97
/
docker-compose.yml
81 lines (74 loc) · 2.18 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
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
x-database-env:
&database-env
POSTGRES_DB: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_USER: "postgres"
x-test-env:
&test-env
WAIT_HOSTS: "postgres_clear:6000,postgres_md5:6001,postgres_scram:6002"
# Wait fifteen seconds after database goes online
# for database metadata initialization
WAIT_AFTER_HOSTS: "15"
x-test-volumes:
&test-volumes
- /var/run/postgres_clear:/var/run/postgres_clear
- /var/run/postgres_md5:/var/run/postgres_md5
- /var/run/postgres_scram:/var/run/postgres_scram
services:
postgres_clear:
# Clear authentication was removed after Postgres 9
image: postgres:9
hostname: postgres_clear
environment:
<<: *database-env
volumes:
- ./docker/postgres_clear/data/:/var/lib/postgresql/host/
- ./docker/postgres_clear/init/:/docker-entrypoint-initdb.d/
- /var/run/postgres_clear:/var/run/postgresql
ports:
- "6000:6000"
postgres_md5:
image: postgres:14
hostname: postgres_md5
environment:
<<: *database-env
volumes:
- ./docker/postgres_md5/data/:/var/lib/postgresql/host/
- ./docker/postgres_md5/init/:/docker-entrypoint-initdb.d/
- /var/run/postgres_md5:/var/run/postgresql
ports:
- "6001:6001"
postgres_scram:
image: postgres:14
hostname: postgres_scram
environment:
<<: *database-env
POSTGRES_HOST_AUTH_METHOD: "scram-sha-256"
POSTGRES_INITDB_ARGS: "--auth-host=scram-sha-256"
volumes:
- ./docker/postgres_scram/data/:/var/lib/postgresql/host/
- ./docker/postgres_scram/init/:/docker-entrypoint-initdb.d/
- /var/run/postgres_scram:/var/run/postgresql
ports:
- "6002:6002"
tests:
build: .
# Name the image to be reused in no_check_tests
image: postgres/tests
command: sh -c "/wait && deno test -A --parallel --check"
depends_on:
- postgres_clear
- postgres_md5
- postgres_scram
environment:
<<: *test-env
volumes: *test-volumes
no_check_tests:
image: postgres/tests
command: sh -c "/wait && deno test -A --parallel --no-check"
depends_on:
- tests
environment:
<<: *test-env
NO_COLOR: "true"
volumes: *test-volumes