Skip to content

Commit ae986e1

Browse files
authored
Merge pull request #646 from infosiftr/PGPORT
Update temporary server to prefer PGPORT if set (since the client and server both normally respect that variable)
2 parents 4c4693e + 89a2fb8 commit ae986e1

13 files changed

+13
-13
lines changed

10/alpine/docker-entrypoint.sh

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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.6/alpine/docker-entrypoint.sh

+1-1
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.6/docker-entrypoint.sh

+1-1
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" \

docker-entrypoint.sh

+1-1
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)