forked from gjrtimmer/docker-postgresql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
84 lines (80 loc) · 1.9 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
82
83
84
version: '3.9'
networks:
psql-playground:
external: true
services:
psql-master:
image: gjrtimmer/postgresql:latest
container_name: psql-master
hostname: master
restart: unless-stopped
environment:
TZ: Europe/Amsterdam
PUID: ${PUID}
PGID: ${PGID}
DB_USER: postgres
DB_PASS: postgres
DB_NAME: test
PL_PERL: "ENABLED"
PL_PYTHON: "ENABLED"
PL_TCL: "ENABLED"
PG_CRON: "ENABLED"
REPLICATION_USER: replicator
REPLICATION_PASS: replicator
REPLICATION_MODE: master
REPLICATION_MAX_SENDERS: 10
networks:
psql-playground:
ipv4_address: 172.50.0.25
ports:
- 5432:5432
volumes:
- ${PWD}/master:/config
psql-standby-1:
image: gjrtimmer/postgresql:latest
container_name: psql-standby-1
hostname: standby-1
restart: unless-stopped
depends_on:
- psql-master
environment:
TZ: Europe/Amsterdam
PUID: ${PUID}
PGID: ${PGID}
REPLICATION_USER: replicator
REPLICATION_PASS: replicator
REPLICATION_HOST: master
REPLICATION_PORT: 5432
REPLICATION_MODE: standby
PG_STANDBY_HOT: enabled
networks:
psql-playground:
ipv4_address: 172.50.0.31
ports:
- 15432:5432
volumes:
- ${PWD}/standby-1:/config
psql-standby-2:
image: gjrtimmer/postgresql:latest
container_name: psql-standby-2
hostname: standby-2
restart: unless-stopped
depends_on:
- psql-master
environment:
TZ: Europe/Amsterdam
PUID: ${PUID}
PGID: ${PGID}
REPLICATION_USER: replicator
REPLICATION_PASS: replicator
REPLICATION_HOST: master
REPLICATION_PORT: 5432
REPLICATION_MODE: standby
PG_STANDBY_HOT: enabled
networks:
psql-playground:
ipv4_address: 172.50.0.32
ports:
- 25432:5432
volumes:
- ${PWD}/standby-2:/config