-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
35 lines (33 loc) · 1.12 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
services:
pg-primary:
image: bitnami/postgresql:latest
ports:
- 5432:5432
depends_on:
- pg-sync-replica
environment:
- POSTGRESQL_REPLICATION_MODE=master
- POSTGRESQL_REPLICATION_USER=pgqp_primary_user
- POSTGRESQL_REPLICATION_PASSWORD=pgqp_primary_password
- POSTGRESQL_DATABASE=pgqp_db
- POSTGRESQL_USERNAME=pgqp_user
- POSTGRESQL_PASSWORD=pgqp_password
- POSTGRESQL_MAX_CONNECTIONS=500
- POSTGRESQL_SYNCHRONOUS_COMMIT_MODE=remote_apply
- POSTGRESQL_NUM_SYNCHRONOUS_REPLICAS=1
pg-sync-replica:
image: bitnami/postgresql:latest
ports:
- 6543:5432
volumes:
- ./pg-configs/sync-replica/conf:/opt/bitnami/postgresql/conf
environment:
- POSTGRESQL_REPLICATION_MODE=slave
- POSTGRESQL_REPLICATION_USER=pgqp_primary_user
- POSTGRESQL_REPLICATION_PASSWORD=pgqp_primary_password
- POSTGRESQL_MASTER_HOST=pg-primary
- POSTGRESQL_MASTER_PORT_NUMBER=5432
- POSTGRESQL_DATABASE=pgqp_db
- POSTGRESQL_USERNAME=pgqp_user
- POSTGRESQL_PASSWORD=pgqp_password
- POSTGRESQL_MAX_CONNECTIONS=500