tazjin/nixery

Add HEALTHCHECK tags

ShuP1 opened this issue · 1 comments

ShuP1 commented

I find (but it's a very personal opinion) docker's healthcheck very usefull.
Sadly they are not included in Nix repo.

Is there any simple way to add them to packages (like mariadb or redis) on a private repo ?

Hi @ShuP1,

The difficulty would be to decide what to use as a healthcheck. For instance, for redis, it could be redis-cli ping, for MariaDB something like mysql -e status, for CLI tool there shouldn't be a healthcheck. And what should we do for images holding multiple services?

AFAIK there isn't a generic way in Nix packges to specify a healthcheck (not that I could find in the Redis derivation, anyway), so I don't know how Nixery could figure out what to use. If someone who knows Nix and nixpkgs better than I do can chime in to confirm that it would be fantastic.