mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-05-04 09:10:29 +00:00
The healthcheck script was querying /api/settings which returns config data rather than system health. Updated to /api/monitoring/health which is the canonical health endpoint used across tests, SystemMonitor.tsx, MaintenanceBanner.tsx, playwright config, and MCP tools.
14 lines
426 B
JavaScript
14 lines
426 B
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Docker healthcheck script for OmniRoute.
|
|
* Checks the /api/monitoring/health endpoint on the dashboard port.
|
|
* Used by Dockerfile and docker-compose files.
|
|
*/
|
|
const port = process.env.DASHBOARD_PORT || process.env.PORT || "20128";
|
|
|
|
fetch(`http://127.0.0.1:${port}/api/monitoring/health`)
|
|
.then((r) => {
|
|
if (!r.ok) throw new Error(`HTTP ${r.status}`);
|
|
})
|
|
.catch(() => process.exit(1));
|