Files
geointel/scripts/verify_gis_runtime.sh
T
Jens d5ea270329
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
Update GeoIntel project files
2026-07-25 23:43:08 +02:00

41 lines
1.2 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
BASE_URL="${1:-${GE_INTEL_BASE_URL:-http://localhost:1202}}"
CAPABILITIES_URL="${BASE_URL%/}/api/v1/system/capabilities"
echo "== GeoIntel GIS runtime verification =="
echo "Checking: ${CAPABILITIES_URL}"
if ! command -v curl >/dev/null 2>&1; then
echo "curl is required for GIS runtime verification" >&2
exit 1
fi
response="$(curl -fsS "${CAPABILITIES_URL}")"
if printf '%s' "${response}" | grep -qi '<!doctype html'; then
echo "Capabilities endpoint returned HTML; frontend proxy/API routing is not correct" >&2
exit 1
fi
if ! printf '%s' "${response}" | grep -q '"postgis":true'; then
echo "PostGIS capability is not reported as available" >&2
printf '%s\n' "${response}" >&2
exit 1
fi
if ! printf '%s' "${response}" | grep -q '"rasterio":true'; then
echo "Rasterio capability is not reported as available in the running backend image" >&2
printf '%s\n' "${response}" >&2
exit 1
fi
if ! printf '%s' "${response}" | grep -q '"geopandas":true'; then
echo "GeoPandas capability is not reported as available in the running backend image" >&2
printf '%s\n' "${response}" >&2
exit 1
fi
echo "GIS runtime capabilities are available."