-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yaml
46 lines (44 loc) · 1.32 KB
/
docker-compose.yaml
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
services:
postgresql-master:
image: 'bitnami/postgresql:latest'
ports:
- '5432:5432'
volumes:
- 'postgresql_master_data:/bitnami/postgresql'
environment:
- POSTGRESQL_PGAUDIT_LOG=READ,WRITE
- POSTGRESQL_LOG_HOSTNAME=TRUE
- POSTGRESQL_REPLICATION_MODE=master
- POSTGRESQL_REPLICATION_USER=repl_user
- POSTGRESQL_REPLICATION_PASSWORD=repl_password
- POSTGRESQL_USERNAME=postgres_write
- POSTGRESQL_PASSWORD=postgres_write
- POSTGRESQL_DATABASE=my_database
postgresql-slave:
image: 'bitnami/postgresql:latest'
ports:
- '15432:5432'
depends_on:
- postgresql-master
environment:
- POSTGRESQL_REPLICATION_MODE=slave
- POSTGRESQL_REPLICATION_USER=repl_user
- POSTGRESQL_REPLICATION_PASSWORD=repl_password
- POSTGRESQL_MASTER_HOST=postgresql-master
- POSTGRESQL_USERNAME=postgres_write
- POSTGRESQL_PASSWORD=postgres_write
- POSTGRESQL_MASTER_PORT_NUMBER=5432
- POSTGRESQL_PGAUDIT_LOG=READ,WRITE
- POSTGRESQL_LOG_HOSTNAME=TRUE
pgadmin4:
image: dpage/pgadmin4
ports:
- "5050:80"
depends_on:
- postgresql-master
environment:
- PGADMIN_DEFAULT_PASSWORD=admin
volumes:
postgresql_master_data:
driver: local