From 581ee762b6fbaec01a6964d3dc04992d59f8f537 Mon Sep 17 00:00:00 2001 From: Raffael Theiler Date: Thu, 3 Mar 2022 19:27:51 +0100 Subject: [PATCH] Update boot.sh Add port to pg_isready to allow non-standard ports. --- boot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot.sh b/boot.sh index a0a1b058..985f5bd7 100644 --- a/boot.sh +++ b/boot.sh @@ -34,7 +34,7 @@ if [ "${DB_ENGINE}" != 'django.db.backends.sqlite3' ]; then display_warning "The environment variable 'POSTGRES_PASSWORD' is not set but REQUIRED for running Tandoor!" fi - while pg_isready --host=${POSTGRES_HOST} -q; status=$?; attempt=$((attempt+1)); [ $status -ne 0 ] && [ $attempt -le $max_attempts ]; do + while pg_isready --host=${POSTGRES_HOST} --port=${POSTGRES_PORT} -q; status=$?; attempt=$((attempt+1)); [ $status -ne 0 ] && [ $attempt -le $max_attempts ]; do sleep 5 done fi @@ -63,4 +63,4 @@ echo "Done" chmod -R 755 /opt/recipes/mediafiles -exec gunicorn -b :$TANDOOR_PORT --access-logfile - --error-logfile - --log-level INFO recipes.wsgi \ No newline at end of file +exec gunicorn -b :$TANDOOR_PORT --access-logfile - --error-logfile - --log-level INFO recipes.wsgi