summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/example.yml4
-rw-r--r--src/config/types.ts1
-rw-r--r--src/db/postgre.ts1
-rw-r--r--src/ormconfig.ts1
4 files changed, 7 insertions, 0 deletions
diff --git a/.config/example.yml b/.config/example.yml
index 0babd037c5..503471d937 100644
--- a/.config/example.yml
+++ b/.config/example.yml
@@ -62,6 +62,10 @@ db:
user: example-misskey-user
pass: example-misskey-pass
+ # Extra Connection options
+ #extra:
+ # ssl: true
+
# ┌─────────────────────┐
#───┘ Redis configuration └─────────────────────────────────────
diff --git a/src/config/types.ts b/src/config/types.ts
index 7da9820f22..c35bc63573 100644
--- a/src/config/types.ts
+++ b/src/config/types.ts
@@ -14,6 +14,7 @@ export type Source = {
db: string;
user: string;
pass: string;
+ extra?: { [x: string]: string };
};
redis: {
host: string;
diff --git a/src/db/postgre.ts b/src/db/postgre.ts
index fcec68602f..04893efe2c 100644
--- a/src/db/postgre.ts
+++ b/src/db/postgre.ts
@@ -93,6 +93,7 @@ export function initDb(justBorrow = false, sync = false, log = false) {
username: config.db.user,
password: config.db.pass,
database: config.db.db,
+ extra: config.db.extra,
synchronize: process.env.NODE_ENV === 'test' || sync,
dropSchema: process.env.NODE_ENV === 'test' && !justBorrow,
logging: log,
diff --git a/src/ormconfig.ts b/src/ormconfig.ts
index 91f33181f4..6b7297b2c3 100644
--- a/src/ormconfig.ts
+++ b/src/ormconfig.ts
@@ -8,6 +8,7 @@ const json = {
username: config.db.user,
password: config.db.pass,
database: config.db.db,
+ extra: config.db.extra,
entities: ['src/models/entities/*.ts'],
migrations: ['migration/*.ts'],
cli: {