fixing boot script
This commit is contained in:
3
boot.sh
3
boot.sh
@ -28,6 +28,7 @@ fi
|
|||||||
|
|
||||||
echo "Waiting for database to be ready..."
|
echo "Waiting for database to be ready..."
|
||||||
|
|
||||||
|
if [ "${DB_ENGINE}" != 'django.db.backends.sqlite3' ]; then
|
||||||
attempt=0
|
attempt=0
|
||||||
max_attempts=20
|
max_attempts=20
|
||||||
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} -q; status=$?; attempt=$((attempt+1)); [ $status -ne 0 ] && [ $attempt -le $max_attempts ]; do
|
||||||
@ -44,6 +45,8 @@ fi
|
|||||||
|
|
||||||
echo "Database is ready"
|
echo "Database is ready"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Migrating database"
|
echo "Migrating database"
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user