diff --git a/scripts/build.sh b/scripts/build.sh index 624187b..dfc6b77 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -20,7 +20,16 @@ docker compose rm -f "$base_or_head" 1>/dev/null url="postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:$port" isready() { - until pg_isready -p "$port" 1>/dev/null; do true; done; + local waited=0 + until pg_isready -p "$port" 1>/dev/null; do + if [[ "$waited" = "10" ]]; then + docker compose logs base + exit 1 + fi + + sleep 1 + $(( waited++ )) + done; } initdb() {