project-nomad/agent/healthcheck.mjs
copilot-swe-agent[bot] 935d0ab22b Add container stack, nginx config, NAS templates, and monitoring agent
Co-authored-by: DocwatZ <227472400+DocwatZ@users.noreply.github.com>
2026-03-13 17:32:28 +00:00

15 lines
263 B
JavaScript

#!/usr/bin/env node
// Simple healthcheck for the Nomad agent
const port = process.env.AGENT_PORT || 9100
try {
const res = await fetch(`http://localhost:${port}/health`)
if (res.ok) {
process.exit(0)
}
process.exit(1)
} catch {
process.exit(1)
}