flatnotes
flatnotes copied to clipboard
[Feature Request] Add healthcheck for contaiers
Hi,
As of now, there is no way to do a curl http://localhost:8080
or a wget --spider http://localhost:8080
to get a container healthcheck.
So far, I managed to get pidof python
but i rekon this might not be the best option.
Would it be possible to provide either curl or wget binary inside the container?
Also, even though providing a fixed listening port could have its advantages, it also prevents hosting Flatnotes aside other containers using port 8080.
Would you reconsider providing a way to define a listening port through environment variables?
Thank you for considering these demands
Cheers
I wouldn't be opposed to this but if I added curl
I'd also want to add a /health
endpoint for it to call. And if I do the latter then I'd need to exclude it from the access logs (else they would get filled up very quickly). Log filtering in FastAPI requires some investigation.
That would be great ! From what I gathered from the internets, it looks feasible, which is a good start :)
I'm no devlopper, but I would be happy to help through testing
Thanks
I'm currently testing a heathcheck so hope to have this in the next release.
everything looks good to me, thanks for the health endpoint !