@tvorilas/node-healthchecker
v1.0.1
Published
Package to check health of docker containers using fs
Downloads
4
Readme
Dependencies free library for docker container healthcheck using fs
npm i @tvorilas/node-healthchecker
Using on app side
import { HealthcheckServer } from '@tvorilas/node-healthchecker'
const healthcheckServer = new HealthcheckServer('/app/healthcheck.txt')
// Do something and call this method
healthcheckServer.ping()
Using in compose-file
services:
app:
healthcheck:
test: ["CMD", "node", "run", "health-check", "--", "/app/healthcheck.txt", "120000"] # 2 minutes in ms
interval: 5s
timeout: 20s
retries: 10