-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathdocker-compose-replication.yaml
More file actions
82 lines (79 loc) · 2.66 KB
/
Copy pathdocker-compose-replication.yaml
File metadata and controls
82 lines (79 loc) · 2.66 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
networks:
pg-net:
services:
postgres:
image: "postgres:${POSTGRES_IMAGE}"
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U datadog -d datadog_test && if [[ ! -e /tmp/container_ready.txt ]]; then exit 1; fi"]
interval: 1s
timeout: 5s
start_period: 60s
retries: 5
networks:
- pg-net
volumes:
- ./resources:/docker-entrypoint-initdb.d/
- ./etc/postgresql:/etc/postgresql/
environment:
POSTGRES_PASSWORD: datad0g
POSTGRES_INITDB_ARGS: "--data-checksums --locale=${POSTGRES_LOCALE}"
command: postgres -c 'config_file=/etc/postgresql/postgresql.conf' -c 'hba_file=/etc/postgresql/pg_hba.conf'
postgres_replica:
image: "postgres:${POSTGRES_IMAGE}"
ports:
- "5433:5433"
healthcheck:
test: ["CMD-SHELL", "pg_isready -p 5433 -U datadog -d datadog_test && if [[ ! -e /tmp/container_ready.txt ]]; then exit 1; fi"]
interval: 1s
timeout: 5s
start_period: 60s
retries: 5
networks:
- pg-net
volumes:
- ./resources_replica:/docker-entrypoint-initdb.d/
- ./etc/postgresql_replica:/etc/postgresql/
environment:
POSTGRES_PASSWORD: datad0g
POSTGRES_INITDB_ARGS: "--data-checksums --locale=${POSTGRES_LOCALE}"
command: postgres -c 'config_file=/etc/postgresql/postgresql.conf'
postgres_replica2:
image: "postgres:${POSTGRES_IMAGE}"
ports:
- "5434:5434"
healthcheck:
test: ["CMD-SHELL", "pg_isready -p 5434 -U datadog -d datadog_test && if [[ ! -e /tmp/container_ready.txt ]]; then exit 1; fi"]
interval: 1s
timeout: 5s
start_period: 60s
retries: 5
networks:
- pg-net
volumes:
- ./resources_replica2:/docker-entrypoint-initdb.d/
- ./etc/postgresql_replica2:/etc/postgresql/
environment:
POSTGRES_PASSWORD: datad0g
POSTGRES_INITDB_ARGS: "--data-checksums --locale=${POSTGRES_LOCALE}"
command: postgres -c 'config_file=/etc/postgresql/postgresql.conf'
postgres_logical_replica:
image: "postgres:${POSTGRES_IMAGE}"
ports:
- "5435:5435"
healthcheck:
test: ["CMD-SHELL", "pg_isready -p 5435 -U datadog -d datadog_test && if [[ ! -e /tmp/container_ready.txt ]]; then exit 1; fi"]
interval: 1s
timeout: 5s
start_period: 60s
retries: 5
networks:
- pg-net
volumes:
- ./resources_logical:/docker-entrypoint-initdb.d/
- ./etc/postgresql_logical_replica:/etc/postgresql/
environment:
POSTGRES_PASSWORD: datad0g
POSTGRES_INITDB_ARGS: "--data-checksums --locale=${POSTGRES_LOCALE}"
command: postgres -c 'config_file=/etc/postgresql/postgresql.conf'