feat: docker healthcheck (#1106)

This commit is contained in:
Jonas Plum
2024-11-04 21:47:55 +01:00
committed by GitHub
parent f42de34780
commit 70ba16a6bd
5 changed files with 30 additions and 26 deletions

View File

@@ -18,6 +18,13 @@ func addRoutes() func(*core.ServeEvent) error {
return c.Redirect(http.StatusFound, "/ui/")
})
e.Router.GET("/ui/*", staticFiles())
e.Router.GET("/health", func(c echo.Context) error {
if _, err := Flags(e.App); err != nil {
return err
}
return c.String(http.StatusOK, "OK")
})
e.Router.GET("/api/config", func(c echo.Context) error {
flags, err := Flags(e.App)