From 699d668cea546ef82f420eecf059099dc66b0096 Mon Sep 17 00:00:00 2001 From: Chono N <49493993+Gyarbij@users.noreply.github.com> Date: Tue, 27 Aug 2024 18:40:27 +0200 Subject: [PATCH 1/2] Add Health endpoint --- main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.go b/main.go index 8a8ec8b..86550c8 100644 --- a/main.go +++ b/main.go @@ -79,6 +79,15 @@ func init() { func main() { router := gin.Default() + + // Health check endpoint + router.GET("/healthz", func(c *gin.Context) { + c.JSON(http.StatusOK, gin.H{ + "status": "healthy", + }) + }) + + // Proxy routes if ProxyMode == "azure" { router.GET("/v1/models", handleGetModels) router.OPTIONS("/v1/*path", handleOptions) From 20f9ddac655bc4b8f0f2a4a0f1a708936302f295 Mon Sep 17 00:00:00 2001 From: Chono N <49493993+Gyarbij@users.noreply.github.com> Date: Tue, 27 Aug 2024 18:41:00 +0200 Subject: [PATCH 2/2] update golang from 1.22.6 to 1.23.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e6ccbcc..2dc5a9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.6 AS builder +FROM golang:1.23.0 AS builder WORKDIR /build COPY . . RUN go get github.com/joho/godotenv