[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. 馃珫 Status page with uptime monitoring & API monitoring as code 馃珫 openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor

fix(status-page): make badge status API URL configurable (#2622) master

* fix(status-page): make badge status API URL configurable getStatus() hardcoded https://api.openstatus.dev, so on self-hosted instances every badge lookup hit the OpenStatus Cloud API, failed to resolve the local page slug, and fell back to "unknown" (#2517). - getStatus() now takes an optional baseUrl and defaults to NEXT_PUBLIC_OPENSTATUS_API_URL when set, keeping current behavior for cloud when it is unset - self-host compose files point the status-page service at http://server:3000 by default * fix(status-page): address review on badge API URL configuration - read OPENSTATUS_API_URL at runtime instead of a NEXT_PUBLIC_-prefixed var: Next.js inlines the latter at image build time, so prebuilt GHCR images could never pick up the runtime compose value - normalize the configured base URL: strip trailing slashes and fall back to the cloud API when empty - drop the env default from docker-compose-lightweight.yaml: that stack does not deploy apps/server, so http://server:3000 was a dead endpoint; operators can point OPENSTATUS_API_URL at any reachable /public/status source * fix(status-page): degrade to unknown on badge fetch rejection getStatus only handled HTTP non-ok responses; a network-level fetch rejection (unreachable server during restart, DNS failure) escaped uncaught and turned into a 500 from the badge routes. Catch it and return the unknown status as intended.