Open wuast94 opened 1 month ago
@wuast94 Makes sense. You can define the healthchecks manually from the compose file as well btw.
yeah i know, the thing is on the worker part i dont even know how to define the healthcheck.
on the web part it should be an extra endpoint that just return a json or something like that if the web part and all sub parts are working as intended (redis db and so on), its more efficient than just checking a rendered html page.
@wuast94 makes sense. The good news is that the worker container is going away in the next release. For the web container, I can add a dummy ping endpoint.
well than it can be a thing i can do maybe. im in the beginning of development (atm im building a web app with svelte), but an healtheck endpoint seams like a nice thing to do for learning 😊
@wuast94 Sure! Hoarder uses Next.js. You can drop a ping/route.ts
here (https://github.com/hoarder-app/hoarder/tree/main/apps/web/app/api) and implement a dummy endpoint (using this docs: https://nextjs.org/docs/app/api-reference/file-conventions/route) to return a plain text containing "PONG" for example. Then you should be able to call it with http://localhost:3000/api/ping
yeah sounds like a nice starting point. if i can i will also return if the redis and db connection are ok 😊
Redis is going away, and the db is sqlite db, so it's usually always ok :)
my bad i meaned meilisearch
would be nice if healthchecks would be added to the containers 😊 im running a swam cluster and containers without a healtheck can make problems