Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 89a2fb8

Browse files
committed
Update temporary server to prefer PGPORT if set (since the client and server both normally respect that variable)
1 parent 4c4693e commit 89a2fb8

13 files changed

+13
-13
lines changed

10/alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ docker_temp_server_start() {
215215

216216
# internal start of server in order to allow setup using psql client
217217
# does not listen on external TCP/IP and waits until start finishes
218-
set -- "$@" -c listen_addresses='' -p 5432
218+
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
219219

220220
PGUSER="${PGUSER:-$POSTGRES_USER}" \
221221
pg_ctl -D "$PGDATA" \

10/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ docker_temp_server_start() {
215215

216216
# internal start of server in order to allow setup using psql client
217217
# does not listen on external TCP/IP and waits until start finishes
218-
set -- "$@" -c listen_addresses='' -p 5432
218+
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
219219

220220
PGUSER="${PGUSER:-$POSTGRES_USER}" \
221221
pg_ctl -D "$PGDATA" \

11/alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ docker_temp_server_start() {
215215

216216
# internal start of server in order to allow setup using psql client
217217
# does not listen on external TCP/IP and waits until start finishes
218-
set -- "$@" -c listen_addresses='' -p 5432
218+
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
219219

220220
PGUSER="${PGUSER:-$POSTGRES_USER}" \
221221
pg_ctl -D "$PGDATA" \

11/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ docker_temp_server_start() {
215215

216216
# internal start of server in order to allow setup using psql client
217217
# does not listen on external TCP/IP and waits until start finishes
218-
set -- "$@" -c listen_addresses='' -p 5432
218+
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
219219

220220
PGUSER="${PGUSER:-$POSTGRES_USER}" \
221221
pg_ctl -D "$PGDATA" \

12/alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ docker_temp_server_start() {
215215

216216
# internal start of server in order to allow setup using psql client
217217
# does not listen on external TCP/IP and waits until start finishes
218-
set -- "$@" -c listen_addresses='' -p 5432
218+
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
219219

220220
PGUSER="${PGUSER:-$POSTGRES_USER}" \
221221
pg_ctl -D "$PGDATA" \

12/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ docker_temp_server_start() {
215215

216216
# internal start of server in order to allow setup using psql client
217217
# does not listen on external TCP/IP and waits until start finishes
218-
set -- "$@" -c listen_addresses='' -p 5432
218+
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
219219

220220
PGUSER="${PGUSER:-$POSTGRES_USER}" \
221221
pg_ctl -D "$PGDATA" \

9.4/alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ docker_temp_server_start() {
215215

216216
# internal start of server in order to allow setup using psql client
217217
# does not listen on external TCP/IP and waits until start finishes
218-
set -- "$@" -c listen_addresses='' -p 5432
218+
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
219219

220220
PGUSER="${PGUSER:-$POSTGRES_USER}" \
221221
pg_ctl -D "$PGDATA" \

9.4/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ docker_temp_server_start() {
215215

216216
# internal start of server in order to allow setup using psql client
217217
# does not listen on external TCP/IP and waits until start finishes
218-
set -- "$@" -c listen_addresses='' -p 5432
218+
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
219219

220220
PGUSER="${PGUSER:-$POSTGRES_USER}" \
221221
pg_ctl -D "$PGDATA" \

9.5/alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ docker_temp_server_start() {
215215

216216
# internal start of server in order to allow setup using psql client
217217
# does not listen on external TCP/IP and waits until start finishes
218-
set -- "$@" -c listen_addresses='' -p 5432
218+
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
219219

220220
PGUSER="${PGUSER:-$POSTGRES_USER}" \
221221
pg_ctl -D "$PGDATA" \

9.5/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ docker_temp_server_start() {
215215

216216
# internal start of server in order to allow setup using psql client
217217
# does not listen on external TCP/IP and waits until start finishes
218-
set -- "$@" -c listen_addresses='' -p 5432
218+
set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}"
219219

220220
PGUSER="${PGUSER:-$POSTGRES_USER}" \
221221
pg_ctl -D "$PGDATA" \

0 commit comments

Comments
 (0)