openfaas / of-watchdog

Reverse proxy for STDIO and HTTP microservices
MIT License
259 stars 115 forks source link

Healthcheck for `FROM scratch` images. #86

Closed reitermarkus closed 4 years ago

reitermarkus commented 4 years ago

Currently, we are able to run fwatchdog in a FROM scratch image, but we cannot run the default healthcheck since there is no [/test command to check for a file's existence as far as I can tell.

Possible Solution

We could add a subcommand for fwatchdog which in turn performs the health check instead of relying on a [/test command being present , i.e.

HEALTHCHECK --interval=2s CMD ["/fwatchdog", "healthcheck"]
alexellis commented 4 years ago

Sounds like a fair request. I believe @stefanprodan does similar for his podinfo example.

https://github.com/stefanprodan/podinfo

This would need to be applied to both watchdogs for consistency.