Self-healthcheck for Caddy Docker Scratch image

Well, if you want a caddy -healthcheck command, you’re starting a new instance of Caddy to do that, which would presumably then communicate with the site-serving Caddy instance to figure out what it needs to know.

You might be thinking along the lines of having the Caddy server collect its list of listeners and pass them to the Caddy healthchecker for the latter to run tests against, maybe?

Or maybe you could just have the Caddy healthcheck parse the Caddy server’s Caddyfile and figure out the hostname / listener configuration itself, then test them all and exit.

Lots of ways to go about it, I think. I know that PRs are always welcome on the Caddy repository.

1 Like