From 68526ddfd45e5eebcb01bfc7f9270f9f8df633a6 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Tue, 20 Aug 2024 13:14:24 +0100 Subject: [PATCH] Add delay, in case the container runs in deployment with hasura. Hasura takes its sweet time to start up, that causes the client to error out as the graphql proxy fires up practically instantly. This is a temporary workaround. --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 3b12218..b1b6e7a 100644 --- a/main.go +++ b/main.go @@ -5,6 +5,7 @@ import ( "os" "strings" "sync" + "time" "github.com/gofiber/fiber/v2/middleware/proxy" "github.com/gookit/goutil/envutil" @@ -118,6 +119,7 @@ func parseConfig() { func main() { parseConfig() StartMonitoringServer() + time.Sleep(5 * time.Second) StartHTTPProxy() }