Use db name parameter for jwt sql

This commit is contained in:
Manuel 2024-03-19 10:35:50 +01:00 committed by GitHub
parent bc36fcb722
commit bd81cc1cc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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