File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ if [ "x$PGUSER" != "x" ]; then
6
6
fi
7
7
if [ " x$PGPASSWORD " != " x" ]; then
8
8
POSTGRES_PASSWORD=$PGPASSWORD
9
- fi
9
+ fi
10
+
11
+ # Forwards-compatibility for old variable names (pg_basebackup uses them)
12
+ if [ " x$PGPASSWORD " = " x" ]; then
13
+ export PGPASSWORD=$POSTGRES_PASSWORD
14
+ fi
10
15
11
16
# Based on official postgres package's entrypoint script (https://hub.docker.com/_/postgres/)
12
17
# Modified to be able to set up a slave. The docker-entrypoint-initdb.d hook provided is inadequate.
@@ -36,7 +41,7 @@ if [ "$1" = 'postgres' ]; then
36
41
echo " Waiting for master to ping..."
37
42
sleep 1s
38
43
done
39
- until gosu postgres pg_basebackup -h ${REPLICATE_FROM} -D ${PGDATA} -U ${POSTGRES_USER} -vP
44
+ until gosu postgres pg_basebackup -h ${REPLICATE_FROM} -D ${PGDATA} -U ${POSTGRES_USER} -vP -w
40
45
do
41
46
echo " Waiting for master to connect..."
42
47
sleep 1s
You can’t perform that action at this time.
0 commit comments