sosedoff / pgweb

Cross-platform client for PostgreSQL databases
https://sosedoff.github.io/pgweb
MIT License
8.64k stars 733 forks source link

Add netcat install in dockerfile to provide a way to healthcheck #572

Closed joubertredrat closed 2 years ago

joubertredrat commented 2 years ago

Today we can add healthcheck into docker compose to inspect if container is running file, but debian:buster-slim doesn't have a way to check by default.

I guess this is a good and light option to check if pgweb is listening and with this, provide health check.

What you think?

joubertredrat commented 2 years ago

Also I guess other people used healtcheck before (like me in https://github.com/joubertredrat/devbox/blob/master/postgres/13.2/docker-compose.yml#L54) and after changed from alpine to debian slim image in https://github.com/sosedoff/pgweb/pull/568/commits/bc4a90774c4b807b8cf58cb92e23a18797bdc323 caused a broke in this checks.

Alpine have netcat by defaut and debian slim not. What you think? Makes sense or sounds weird?

sosedoff commented 2 years ago

Yea looks fine to me. I rarely use healthchecks with pgweb but having a working option wont hurt anyone.