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

Fix docker entrypoint errors introduced by #715 #721

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ run_service() {
wait-for-tcp "${PULP_DB_HOST:-localhost}" "${PULP_DB_PORT:-5432}"
wait-for-tcp "${PULP_REDIS_HOST:-localhost}" "${PULP_REDIS_PORT:-6379}"

# TODO: remove once Pulp recognizes REDIS_SSL parameter when building
# settings for RQ in pulpcore/rqconfig.py
redis_connection_hack
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can move it below wait-for-tcp to avoid variable assignments


if [[ "$WITH_DEV_INSTALL" -eq "1" ]]; then
install_local_deps
fi
Expand All @@ -97,13 +101,13 @@ run_manage() {


redis_connection_hack() {
if [[ "$PULP_REDIS_SSL" == "true" ]]; then
if [[ ${PULP_REDIS_SSL:-false} = "true" ]]; then
protocol="rediss://"
else
protocol="redis://"
fi

if [[ -z "$PULP_REDIS_PASSWORD" ]]; then
if [[ -z "${PULP_REDIS_PASSWORD:-}" ]]; then
password=""
else
password=":${PULP_REDIS_PASSWORD}@"
Expand All @@ -119,9 +123,6 @@ main() {
exec "/bin/bash"
fi

# TODO: remove once Pulp recognizes REDIS_SSL parameter when building settings for RQ in pulpcore/rqconfig.py
redis_connection_hack

case "$1" in
'run')
run_service "${@:2}"
Expand Down