fix: read database URL from secrets.yaml as fallback

configData.database?.url was removed from the prod configmap (database
credentials belong in secrets), but the code only checked configData.
Add secretsData.database?.url as a fallback so prod can supply the URL
via the gateway-secrets Secret.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-16 18:41:41 -04:00
parent 3153e89d4f
commit c8fa99c6d2

View File

@@ -86,7 +86,7 @@ function loadConfig() {
'http://localhost:5173',
'http://localhost:8080',
],
databaseUrl: configData.database?.url || process.env.DATABASE_URL || 'postgresql://localhost/dexorder',
databaseUrl: configData.database?.url || secretsData.database?.url || process.env.DATABASE_URL || 'postgresql://localhost/dexorder',
// Authentication configuration
authSecret: secretsData.auth?.secret || process.env.AUTH_SECRET || 'change-me-in-production',