feat: pass Mollie API key via docker-compose, prioritize env vars over Infisical
Docker-compose env vars now take precedence over Infisical secrets, allowing production keys to be set directly in .env without needing Infisical write access. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a397e4abe9
commit
d7cfb6ded5
|
|
@ -13,6 +13,7 @@ services:
|
||||||
- LISTMONK_DB_USER=listmonk
|
- LISTMONK_DB_USER=listmonk
|
||||||
- LISTMONK_DB_PASS=${LISTMONK_DB_PASS:-listmonk_secure_2025}
|
- LISTMONK_DB_PASS=${LISTMONK_DB_PASS:-listmonk_secure_2025}
|
||||||
- LISTMONK_LIST_ID=24
|
- LISTMONK_LIST_ID=24
|
||||||
|
- MOLLIE_API_KEY=${MOLLIE_API_KEY}
|
||||||
depends_on:
|
depends_on:
|
||||||
votc-db:
|
votc-db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,9 @@ const get = (path, token) => new Promise((resolve, reject) => {
|
||||||
if (!secrets.secrets) { console.error('[infisical] No secrets returned'); process.exit(1); }
|
if (!secrets.secrets) { console.error('[infisical] No secrets returned'); process.exit(1); }
|
||||||
|
|
||||||
// Output as shell-safe export statements
|
// Output as shell-safe export statements
|
||||||
|
// Skip vars already set via docker-compose (env vars take precedence over Infisical)
|
||||||
for (const s of secrets.secrets) {
|
for (const s of secrets.secrets) {
|
||||||
|
if (process.env[s.secretKey]) continue;
|
||||||
// Single-quote the value to prevent shell expansion, escape existing single quotes
|
// Single-quote the value to prevent shell expansion, escape existing single quotes
|
||||||
const escaped = s.secretValue.replace(/'/g, \"'\\\\''\" );
|
const escaped = s.secretValue.replace(/'/g, \"'\\\\''\" );
|
||||||
console.log('export ' + s.secretKey + \"='\" + escaped + \"'\");
|
console.log('export ' + s.secretKey + \"='\" + escaped + \"'\");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue