Browse Source
fix: healthcheck script
Signed-off-by: rare-magma <rare-magma@posteo.eu>
pull/3614/head
rare-magma
1 year ago
Failed to extract signature
1 changed files with
2 additions and
3 deletions
-
docker/healthcheck.js
|
|
@ -1,10 +1,9 @@ |
|
|
|
import { request } from "node:http"; |
|
|
|
const request = require("node:http"); |
|
|
|
|
|
|
|
const options = { |
|
|
|
host : "localhost", |
|
|
|
path: "/api/v1/health", |
|
|
|
port : "3333", |
|
|
|
timeout : 2000 |
|
|
|
}; |
|
|
|
|
|
|
|
const healthCheck = request(options, (res) => { |
|
|
@ -18,7 +17,7 @@ const healthCheck = request(options, (res) => { |
|
|
|
}); |
|
|
|
|
|
|
|
healthCheck.on('error', (err) => { |
|
|
|
console.error(err); |
|
|
|
console.error(err.message); |
|
|
|
process.exit(1); |
|
|
|
}); |
|
|
|
|
|
|
|