Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust "docker_temp_server_start" to override port for consistent unix socket path #642

Merged
merged 1 commit into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions 10/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down
7 changes: 5 additions & 2 deletions 10/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down
7 changes: 5 additions & 2 deletions 11/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down
7 changes: 5 additions & 2 deletions 11/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down
7 changes: 5 additions & 2 deletions 12/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down
7 changes: 5 additions & 2 deletions 12/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down
7 changes: 5 additions & 2 deletions 9.4/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down
7 changes: 5 additions & 2 deletions 9.4/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down
7 changes: 5 additions & 2 deletions 9.5/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down
7 changes: 5 additions & 2 deletions 9.5/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down
7 changes: 5 additions & 2 deletions 9.6/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down
7 changes: 5 additions & 2 deletions 9.6/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down
7 changes: 5 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,14 @@ docker_temp_server_start() {
if [ "$1" = 'postgres' ]; then
shift
fi

# internal start of server in order to allow setup using psql client
# does not listen on external TCP/IP and waits until start finishes (can be overridden via args)
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c listen_addresses='' -p 5432

PGUSER="${PGUSER:-$POSTGRES_USER}" \
pg_ctl -D "$PGDATA" \
-o "-c listen_addresses='' $([ "$#" -gt 0 ] && printf '%q ' "$@")" \
-o "$(printf '%q ' "$@")" \
-w start
}

Expand Down