This commit is contained in:
Ubuntu 2026-01-26 12:54:51 +00:00
parent cfd87a4b7c
commit f30268f11c

View file

@ -0,0 +1,20 @@
services:
postgres-replica:
image: postgres:17
container_name: postgres-replica
restart: unless-stopped
ports:
- "7447:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: mytestdb
volumes:
- ./data:/var/lib/postgresql/data
- ./postgresql.conf:/etc/postgresql/postgresql.conf:ro
- ./pg_hba.conf:/etc/postgresql/pg_hba.conf:ro
- ./init-replication.sh:/docker-entrypoint-initdb.d/10-init-replication.sh:ro
command: >
postgres
-c config_file=/etc/postgresql/postgresql.conf
-c hba_file=/etc/postgresql/pg_hba.conf