-
Notifications
You must be signed in to change notification settings - Fork 474
Expand file tree
/
Copy pathdocker-compose.replication.yml
More file actions
57 lines (48 loc) · 1.14 KB
/
docker-compose.replication.yml
File metadata and controls
57 lines (48 loc) · 1.14 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
version: "3.7"
services:
master-db:
restart: always
container_name: master-db
build: .
ports:
- 5432:5432
environment:
- DEBUG=true
- DB_USER=dbuser
- DB_PASS=dbuserpass
- DB_NAME=dbname
- DB_TEMPLATE=
- DB_EXTENSION=
- REPLICATION_MODE=
- REPLICATION_USER=repluser
- REPLICATION_PASS=repluserpass
- REPLICATION_SSLMODE=
# command: "--wal_keep_segments=32 --logging_collector=off"
volumes:
- ./postgresql-master:/var/lib/postgresql
slave-db:
restart: always
container_name: slave-db
build: .
ports:
- 9432:5432
depends_on:
- master-db
links:
- master-db
environment:
- DEBUG=true
- DB_USER=
- DB_PASS=
- DB_NAME=
- DB_TEMPLATE=
- DB_EXTENSION=
- REPLICATION_MODE=slave
- REPLICATION_HOST=master-db
- REPLICATION_PORT=5432
- REPLICATION_USER=repluser
- REPLICATION_PASS=repluserpass
- REPLICATION_SSLMODE=prefer
# command: "--wal_keep_segments=32 --logging_collector=off"
volumes:
- ./postgresql-slave:/var/lib/postgresql