Final save before migration

This commit is contained in:
2023-08-07 10:35:45 -04:00
parent 122d808fc2
commit 26e6a23636
9 changed files with 236 additions and 7 deletions

View File

@ -105,6 +105,11 @@ const pgConfigFromEnv = (env) => {
},
};
if (!!process.env.DB_SSLMODE && process.env.DB_SSLMODE !== 'disable') {
pgConfigs.development.ssl = true;
pgConfigs.production.ssl = {ca: fs.readFileSync("ca-certificate.crt") };
}
let baseConfig;
if (env.DATABASE_URL) {
@ -122,7 +127,7 @@ const pgConfigFromEnv = (env) => {
baseConfig.ssl = { rejectUnauthorized: false };
break;
default:
baseConfig.ssl = {};
baseConfig.ssl = { rejectUnauthorized: false };
break;
}
}