diff --git a/cmd/rekor-server/app/serve.go b/cmd/rekor-server/app/serve.go index 747bd7f00..f67bf87a1 100644 --- a/cmd/rekor-server/app/serve.go +++ b/cmd/rekor-server/app/serve.go @@ -131,10 +131,13 @@ var serveCmd = &cobra.Command{ api.ConfigureAPI(treeID) server.ConfigureAPI() - http.Handle("/metrics", promhttp.Handler()) + utilMux := http.NewServeMux() + utilMux.Handle("/metrics", promhttp.Handler()) + utilHandler := middleware.Heartbeat("/ping")(utilMux) go func() { srv := &http.Server{ Addr: ":2112", + Handler: utilHandler, ReadTimeout: 10 * time.Second, WriteTimeout: 10 * time.Second, } diff --git a/docker-compose.yml b/docker-compose.yml index b53b3fe34..dd2065518 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -131,7 +131,8 @@ services: trillian-log-server: condition: service_healthy healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:3000/ping"] + # health check is on the util port + test: ["CMD", "curl", "-f", "http://localhost:2112/ping"] interval: 10s timeout: 3s retries: 15