|
@@ -1,11 +1,15 @@
|
|
|
require('dotenv').config();
|
|
|
|
|
|
+const pg = require('pg');
|
|
|
+pg.defaults.ssl = {
|
|
|
+ rejectUnauthorized: false,
|
|
|
+};
|
|
|
|
|
|
module.exports = {
|
|
|
development: {
|
|
|
client: process.env.DB_CLIENT,
|
|
|
connection: {
|
|
|
- host: process.env.DATABASE_URL,
|
|
|
+ host: process.env.DB_HOST,
|
|
|
database: process.env.DATABASE,
|
|
|
user: process.env.DB_USERNAME,
|
|
|
password: process.env.DB_PASSWORD,
|
|
@@ -19,4 +23,17 @@ module.exports = {
|
|
|
directory: process.env.MIGRATIONS
|
|
|
}
|
|
|
},
|
|
|
-};
|
|
|
+ production: {
|
|
|
+ client: process.env.DB_CLIENT,
|
|
|
+ connection: process.env.DATABASE_URL,
|
|
|
+ ssl: { rejectUnauthorized: false },
|
|
|
+ pool: {
|
|
|
+ min: 2,
|
|
|
+ max: 10
|
|
|
+ },
|
|
|
+ migrations: {
|
|
|
+ tableName: 'knex_migrations',
|
|
|
+ directory: process.env.MIGRATIONS
|
|
|
+ }
|
|
|
+ },
|
|
|
+}
|