Remove static postgres tls settings

They can be configured through `extra` in config.
This commit is contained in:
sparrow 2023-06-28 01:48:55 +01:00
parent 75518ed1f1
commit cc32d09913
4 changed files with 3 additions and 11 deletions

View File

@ -48,8 +48,9 @@ db:
# Extra Connection options # Extra Connection options
#extra: #extra:
# TODO: find another example # ssl:
# ssl: true # host: localhost
# rejectUnauthorized: false
# ┌─────────────────────┐ # ┌─────────────────────┐
#───┘ Redis configuration └───────────────────────────────────── #───┘ Redis configuration └─────────────────────────────────────

View File

@ -12,8 +12,4 @@ export default new DataSource({
extra: config.db.extra, extra: config.db.extra,
entities: entities, entities: entities,
migrations: ["migration/*.js"], migrations: ["migration/*.js"],
ssl: config.db.ssl ? {
rejectUnauthorized: false, //TODO make configurable
ca: process.env.DB_SSL_CERT,
} : undefined,
}); });

View File

@ -15,7 +15,6 @@ export type Source = {
pass: string; pass: string;
disableCache?: boolean; disableCache?: boolean;
extra?: { [x: string]: string }; extra?: { [x: string]: string };
ssl?: boolean;
}; };
redis: { redis: {
host: string; host: string;

View File

@ -223,10 +223,6 @@ export const db = new DataSource({
maxQueryExecutionTime: 300, maxQueryExecutionTime: 300,
entities: entities, entities: entities,
migrations: ["../../migration/*.js"], migrations: ["../../migration/*.js"],
ssl: config.db.ssl ? {
rejectUnauthorized: false,
ca: process.env.DB_SSL_CERT,
} : undefined,
}); });
export async function initDb(force = false) { export async function initDb(force = false) {