fix: 🐛 support for SSL data when loading redis and postgres configs
Closes #10366
This commit is contained in:
parent
7575a04a5f
commit
3df3c97deb
|
@ -12,4 +12,8 @@ export default new DataSource({
|
|||
extra: config.db.extra,
|
||||
entities: entities,
|
||||
migrations: ["migration/*.js"],
|
||||
ssl: {
|
||||
rejectUnauthorized: false,
|
||||
ca: process.env.DB_SSL_CERT,
|
||||
},
|
||||
});
|
||||
|
|
|
@ -207,9 +207,14 @@ export const db = new DataSource({
|
|||
host: config.redis.host,
|
||||
port: config.redis.port,
|
||||
family: config.redis.family == null ? 0 : config.redis.family,
|
||||
user: "default",
|
||||
password: config.redis.pass,
|
||||
keyPrefix: `${config.redis.prefix}:query:`,
|
||||
db: config.redis.db || 0,
|
||||
tls: {
|
||||
host: config.redis.host,
|
||||
rejectUnauthorized: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
: false,
|
||||
|
@ -218,6 +223,10 @@ export const db = new DataSource({
|
|||
maxQueryExecutionTime: 300,
|
||||
entities: entities,
|
||||
migrations: ["../../migration/*.js"],
|
||||
ssl: {
|
||||
rejectUnauthorized: false,
|
||||
ca: process.env.DB_SSL_CERT,
|
||||
},
|
||||
});
|
||||
|
||||
export async function initDb(force = false) {
|
||||
|
|
|
@ -7,8 +7,13 @@ export function createConnection() {
|
|||
host: config.redis.host,
|
||||
family: config.redis.family == null ? 0 : config.redis.family,
|
||||
password: config.redis.pass,
|
||||
username: "default",
|
||||
keyPrefix: `${config.redis.prefix}:`,
|
||||
db: config.redis.db || 0,
|
||||
tls: {
|
||||
rejectUnauthorized: false,
|
||||
host: config.redis.host,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,12 @@ export function initialize<T>(name: string, limitPerSec = -1) {
|
|||
port: config.redis.port,
|
||||
host: config.redis.host,
|
||||
family: config.redis.family == null ? 0 : config.redis.family,
|
||||
user: "default",
|
||||
password: config.redis.pass,
|
||||
db: config.redis.db || 0,
|
||||
tls: {
|
||||
host: config.redis.host,
|
||||
},
|
||||
},
|
||||
prefix: config.redis.prefix ? `${config.redis.prefix}:queue` : "queue",
|
||||
limiter:
|
||||
|
|
Loading…
Reference in New Issue