aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-15 08:21:00 +0100
committerChocobozzz <me@florianbigard.com>2017-12-15 08:21:00 +0100
commit228077efd73485a2832bb6211c9fa923158c2112 (patch)
tree7db3a92dde694d4e422be5f4de75ace62874af07
parent6f045b57915d0eac8e590c503b362d2df5e16b85 (diff)
downloadPeerTube-228077efd73485a2832bb6211c9fa923158c2112.tar.gz
PeerTube-228077efd73485a2832bb6211c9fa923158c2112.tar.zst
PeerTube-228077efd73485a2832bb6211c9fa923158c2112.zip
Fix database connection (host + port)
-rw-r--r--server/initializers/database.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/initializers/database.ts b/server/initializers/database.ts
index 2260938b1..85d205cdc 100644
--- a/server/initializers/database.ts
+++ b/server/initializers/database.ts
@@ -28,13 +28,16 @@ require('pg').defaults.parseInt8 = true // Avoid BIGINT to be converted to strin
28const dbname = CONFIG.DATABASE.DBNAME 28const dbname = CONFIG.DATABASE.DBNAME
29const username = CONFIG.DATABASE.USERNAME 29const username = CONFIG.DATABASE.USERNAME
30const password = CONFIG.DATABASE.PASSWORD 30const password = CONFIG.DATABASE.PASSWORD
31const host = CONFIG.DATABASE.HOSTNAME
32const port = CONFIG.DATABASE.PORT
31 33
32const sequelizeTypescript = new SequelizeTypescript({ 34const sequelizeTypescript = new SequelizeTypescript({
33 database: dbname, 35 database: dbname,
34 dialect: 'postgres', 36 dialect: 'postgres',
37 host,
38 port,
35 username, 39 username,
36 password, 40 password,
37 modelPaths: [__dirname + '/models'],
38 benchmark: isTestInstance(), 41 benchmark: isTestInstance(),
39 isolationLevel: SequelizeTypescript.Transaction.ISOLATION_LEVELS.SERIALIZABLE, 42 isolationLevel: SequelizeTypescript.Transaction.ISOLATION_LEVELS.SERIALIZABLE,
40 operatorsAliases: false, 43 operatorsAliases: false,