From bd81cc1cc49bd0ee795ba9d435562aa9fa51c118 Mon Sep 17 00:00:00 2001 From: Manuel Date: Tue, 19 Mar 2024 10:35:50 +0100 Subject: [PATCH] Use db name parameter for jwt sql --- templates/compose/supabase.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/compose/supabase.yaml b/templates/compose/supabase.yaml index 68d42e971..9065336c6 100644 --- a/templates/compose/supabase.yaml +++ b/templates/compose/supabase.yaml @@ -559,9 +559,10 @@ services: content: | \set jwt_secret `echo "$JWT_SECRET"` \set jwt_exp `echo "$JWT_EXP"` + \set db_name `echo "${POSTGRES_DB:-postgres}"` - ALTER DATABASE postgres SET "app.settings.jwt_secret" TO :'jwt_secret'; - ALTER DATABASE postgres SET "app.settings.jwt_exp" TO :'jwt_exp'; + ALTER DATABASE :'db_name' SET "app.settings.jwt_secret" TO :'jwt_secret'; + ALTER DATABASE :'db_name' SET "app.settings.jwt_exp" TO :'jwt_exp'; - type: bind source: ./volumes/db/logs.sql