initial
This commit is contained in:
commit
6483a81f2e
41
docker-compose.yaml
Normal file
41
docker-compose.yaml
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
networks:
|
||||
pg-replication:
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
pg-1:
|
||||
image: 'bitnami/postgresql:14'
|
||||
container_name: pg-repl-master
|
||||
environment:
|
||||
POSTGRESQL_USER: pguser
|
||||
POSTGRESQL_PASSWORD: 1234
|
||||
POSTGRESQL_REPLICATION_MODE: master
|
||||
POSTGRESQL_REPLICATION_USER: repuser
|
||||
POSTGRESQL_REPLICATION_PASSWORD: repuserpass
|
||||
POSTGRESQL_WAL_LEVEL: replica
|
||||
volumes:
|
||||
- ./pg-1:/bitnami/postgresql:Z
|
||||
networks:
|
||||
- pg-replication
|
||||
ports:
|
||||
- "15432:5432"
|
||||
|
||||
pg-2:
|
||||
image: 'bitnami/postgresql:14'
|
||||
container_name: pg-repl-slave
|
||||
environment:
|
||||
POSTGRESQL_USER: pguser
|
||||
POSTGRESQL_PASSWORD: 1234
|
||||
POSTGRESQL_MASTER_HOST: pg-repl-master
|
||||
POSTGRESQL_REPLICATION_MODE: slave
|
||||
POSTGRESQL_REPLICATION_USER: repuser
|
||||
POSTGRESQL_REPLICATION_PASSWORD: repuserpass
|
||||
POSTGRESQL_WAL_LEVEL: replica
|
||||
volumes:
|
||||
- ./pg-2:/bitnami/postgresql:Z
|
||||
networks:
|
||||
- pg-replication
|
||||
ports:
|
||||
- "25432:5432"
|
||||
|
Loading…
Reference in New Issue
Block a user