Skip to content

Commit

Permalink
Merge pull request #642 from infosiftr/temporary-port
Browse files Browse the repository at this point in the history
Adjust "docker_temp_server_start" to override port for consistent unix socket path
  • Loading branch information
yosifkit authored Nov 26, 2019
2 parents 5beb1d4 + 820323f commit 50ea342
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 26 deletions.
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

0 comments on commit 50ea342

Please sign in to comment.