diff --git a/scripts/init_db.sh b/scripts/init_db.sh index 42625bf..9c44935 100755 --- a/scripts/init_db.sh +++ b/scripts/init_db.sh @@ -31,8 +31,8 @@ then CONTAINER_NAME="postgres_$(date '+%s')" # Launch postgres using Docker docker run \ - --env POSTGRES_USER=${SUPERUSER} \ - --env POSTGRES_PASSWORD=${SUPERUSER_PWD} \ + --env POSTGRES_USER="${SUPERUSER}" \ + --env POSTGRES_PASSWORD="${SUPERUSER_PWD}" \ --health-cmd="pg_isready -U ${SUPERUSER} || exit 1" \ --health-interval=1s \ --health-timeout=5s \ @@ -44,7 +44,7 @@ then # ^ Increased maximum number of connections for testing purposes until [ \ - "$(docker inspect -f "{{.State.Health.Status}}" ${CONTAINER_NAME})" == \ + "$(docker inspect -f "{{.State.Health.Status}}" "${CONTAINER_NAME}")" == \ "healthy" \ ]; do >&2 echo "Postgres is still unavailable - sleeping"