Skip to content

Commit 6a35e36

Browse files
committed
More verbose comments
1 parent 06b1248 commit 6a35e36

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

20-replication.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ elif [ $REPLICATION_ROLE = "slave" ]; then
88
# stop postgres instance and reset PGDATA,
99
# confs will be copied by pg_basebackup
1010
gosu postgres pg_ctl -D "$PGDATA" -m fast -w stop
11+
# make sure standby's data directory is empty
1112
rm -r "$PGDATA"/*
1213

1314
gosu postgres pg_basebackup \

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ ENV POSTGRES_MASTER_SERVICE_PORT 5432
1919

2020
COPY 10-config.sh /docker-entrypoint-initdb.d/
2121
COPY 20-replication.sh /docker-entrypoint-initdb.d/
22-
# Evaluate vars inside PGDATA (eg PGDATA=/mnt/$HOSTNAME)
22+
# Evaluate vars inside PGDATA at runtime.
23+
# For example HOSTNAME in 'ENV PGDATA=/mnt/$HOSTNAME'
24+
# is resolved runtime rather then during build
2325
RUN sed -i 's/set -e/set -e -x\nPGDATA=$(eval echo "$PGDATA")/' /docker-entrypoint.sh

0 commit comments

Comments
 (0)