From 14ef1d319042555e3c7932b7e3f28d212cf85a98 Mon Sep 17 00:00:00 2001 From: Konst Date: Fri, 30 Aug 2024 16:45:18 +0300 Subject: [PATCH] Added default value to HASURA_POSTGRES_HOST; Added hasura config log output --- build/dipdup.yml | 2 +- cmd/metadata/main.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build/dipdup.yml b/build/dipdup.yml index 6017210..dabff17 100644 --- a/build/dipdup.yml +++ b/build/dipdup.yml @@ -125,7 +125,7 @@ hasura: rest: true source: name: default - database_host: ${HASURA_POSTGRES_HOST} + database_host: ${HASURA_POSTGRES_HOST:-db} use_prepared_statements: true isolation_level: read-committed diff --git a/cmd/metadata/main.go b/cmd/metadata/main.go index 48cde52..103c414 100644 --- a/cmd/metadata/main.go +++ b/cmd/metadata/main.go @@ -2,6 +2,7 @@ package main import ( "context" + "encoding/json" "os" "os/signal" "runtime" @@ -87,6 +88,8 @@ func main() { } if cfg.Hasura != nil { + hasuraConfig, _ := json.Marshal(cfg.Hasura) + log.Info().RawJSON("HasuraConfig", hasuraConfig).Msg("") if err := hasura.Create(ctx, hasura.GenerateArgs{ Config: cfg.Hasura, DatabaseConfig: cfg.Database,