20 lines
638 B
YAML
20 lines
638 B
YAML
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
|