fix: allow bounded PostGIS crash recovery
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-22 03:51:45 +02:00
parent c2101ea8f9
commit ab01c93d49
5 changed files with 22 additions and 3 deletions
+5 -2
View File
@@ -56,7 +56,10 @@ echo "Starting embedded PostGIS..."
postgres_pid="$!"
echo "Waiting for embedded PostGIS..."
for attempt in $(seq 1 60); do
# Large persistent PostGIS volumes can require several minutes of crash
# recovery after an interrupted container replacement. Keep the wait bounded,
# but do not terminate recovery at the former two-minute ceiling.
for attempt in $(seq 1 450); do
if pg_isready -h 127.0.0.1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" >/dev/null 2>&1; then
echo "PostGIS is ready after attempt ${attempt}."
break
@@ -69,7 +72,7 @@ for attempt in $(seq 1 60); do
done
if ! pg_isready -h 127.0.0.1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" >/dev/null 2>&1; then
echo "PostGIS did not become ready."
echo "PostGIS did not become ready within 15 minutes."
exit 1
fi