diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-15 08:21:00 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-15 08:21:00 +0100 |
commit | 228077efd73485a2832bb6211c9fa923158c2112 (patch) | |
tree | 7db3a92dde694d4e422be5f4de75ace62874af07 /server/initializers | |
parent | 6f045b57915d0eac8e590c503b362d2df5e16b85 (diff) | |
download | PeerTube-228077efd73485a2832bb6211c9fa923158c2112.tar.gz PeerTube-228077efd73485a2832bb6211c9fa923158c2112.tar.zst PeerTube-228077efd73485a2832bb6211c9fa923158c2112.zip |
Fix database connection (host + port)
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/database.ts | 5 |
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 | |||
28 | const dbname = CONFIG.DATABASE.DBNAME | 28 | const dbname = CONFIG.DATABASE.DBNAME |
29 | const username = CONFIG.DATABASE.USERNAME | 29 | const username = CONFIG.DATABASE.USERNAME |
30 | const password = CONFIG.DATABASE.PASSWORD | 30 | const password = CONFIG.DATABASE.PASSWORD |
31 | const host = CONFIG.DATABASE.HOSTNAME | ||
32 | const port = CONFIG.DATABASE.PORT | ||
31 | 33 | ||
32 | const sequelizeTypescript = new SequelizeTypescript({ | 34 | const 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, |