chore(env): update knex config to match NODE_ENV values

This commit is contained in:
Aminejv 2021-08-09 16:41:31 +01:00
parent 4f1b0d951c
commit 7aa1039482

View File

@ -1,7 +1,6 @@
import * as Environment from "~/node_common/environment";
module.exports = {
development: {
const developmentConfig = {
client: "pg",
connection: {
ssl: true,
@ -11,16 +10,22 @@ module.exports = {
user: Environment.POSTGRES_ADMIN_USERNAME,
password: Environment.POSTGRES_ADMIN_PASSWORD,
},
},
production: {
client: "pg",
connection: {
ssl: true,
port: 5432,
host: Environment.POSTGRES_HOSTNAME,
database: Environment.POSTGRES_DATABASE,
user: Environment.POSTGRES_ADMIN_USERNAME,
password: Environment.POSTGRES_ADMIN_PASSWORD,
},
},
};
const productionConfig = {
client: "pg",
connection: {
ssl: true,
port: 5432,
host: Environment.POSTGRES_HOSTNAME,
database: Environment.POSTGRES_DATABASE,
user: Environment.POSTGRES_ADMIN_USERNAME,
password: Environment.POSTGRES_ADMIN_PASSWORD,
},
};
module.exports = {
development: developmentConfig,
staging: productionConfig,
production: productionConfig,
};