mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-09 19:23:08 +02:00
Support PostgreSQL Extra Connection options (#4970)
This commit is contained in:
parent
f54cd10a04
commit
6de08d07a3
4 changed files with 7 additions and 0 deletions
|
@ -62,6 +62,10 @@ db:
|
||||||
user: example-misskey-user
|
user: example-misskey-user
|
||||||
pass: example-misskey-pass
|
pass: example-misskey-pass
|
||||||
|
|
||||||
|
# Extra Connection options
|
||||||
|
#extra:
|
||||||
|
# ssl: true
|
||||||
|
|
||||||
# ┌─────────────────────┐
|
# ┌─────────────────────┐
|
||||||
#───┘ Redis configuration └─────────────────────────────────────
|
#───┘ Redis configuration └─────────────────────────────────────
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ export type Source = {
|
||||||
db: string;
|
db: string;
|
||||||
user: string;
|
user: string;
|
||||||
pass: string;
|
pass: string;
|
||||||
|
extra?: { [x: string]: string };
|
||||||
};
|
};
|
||||||
redis: {
|
redis: {
|
||||||
host: string;
|
host: string;
|
||||||
|
|
|
@ -93,6 +93,7 @@ export function initDb(justBorrow = false, sync = false, log = false) {
|
||||||
username: config.db.user,
|
username: config.db.user,
|
||||||
password: config.db.pass,
|
password: config.db.pass,
|
||||||
database: config.db.db,
|
database: config.db.db,
|
||||||
|
extra: config.db.extra,
|
||||||
synchronize: process.env.NODE_ENV === 'test' || sync,
|
synchronize: process.env.NODE_ENV === 'test' || sync,
|
||||||
dropSchema: process.env.NODE_ENV === 'test' && !justBorrow,
|
dropSchema: process.env.NODE_ENV === 'test' && !justBorrow,
|
||||||
logging: log,
|
logging: log,
|
||||||
|
|
|
@ -8,6 +8,7 @@ const json = {
|
||||||
username: config.db.user,
|
username: config.db.user,
|
||||||
password: config.db.pass,
|
password: config.db.pass,
|
||||||
database: config.db.db,
|
database: config.db.db,
|
||||||
|
extra: config.db.extra,
|
||||||
entities: ['src/models/entities/*.ts'],
|
entities: ['src/models/entities/*.ts'],
|
||||||
migrations: ['migration/*.ts'],
|
migrations: ['migration/*.ts'],
|
||||||
cli: {
|
cli: {
|
||||||
|
|
Loading…
Reference in a new issue