From ca2db6efdcda4a866d47d9902d20077c77ac864d Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Wed, 1 Jan 2025 15:49:55 +0700 Subject: [PATCH] update config --- config/default.json | 3 ++- config/prod.json | 31 +++++++++++++++++++++++++++++++ config/stag.json | 6 +++--- src/helpers/orm.ts | 2 +- 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/config/default.json b/config/default.json index a1ece90..2515e0b 100644 --- a/config/default.json +++ b/config/default.json @@ -25,6 +25,7 @@ "port": "5432", "username": "postgres", "password": "123", - "database": "bri_erp" + "database": "bri_erp", + "logging": true } } diff --git a/config/prod.json b/config/prod.json index e69de29..2b94133 100644 --- a/config/prod.json +++ b/config/prod.json @@ -0,0 +1,31 @@ +{ + "app": { + "name": "Service Master Data", + "description": "Purpose of this service is to provide master data product, master data suco and etc", + "version": "1.0.0", + "env": "Production" + }, + "server": { + "port": "4010", + "host": "0.0.0.0", + "host_swagger": "https://brilianapps.britimorleste.tl/test/m/", + "max_body": "50mb", + "max_upload": 104857600, + "morgan": "combined", + "cors": "*", + "ssl": { + "enable": false, + "cert": "", + "key": "" + } + }, + "database": { + "engine": "postgres", + "host": "172.16.11.202", + "port": "5432", + "username": "bri_production", + "password": "44jTPj54%6<£", + "database": "bri_erp_production", + "logging": false + } +} diff --git a/config/stag.json b/config/stag.json index 056b7df..a387361 100644 --- a/config/stag.json +++ b/config/stag.json @@ -15,8 +15,8 @@ "cors": "*", "ssl": { "enable": false, - "cert": "/etc/letsencrypt/live/bri-dev.shiblysolution.id/fullchain.pem", - "key": "/etc/letsencrypt/live/bri-dev.shiblysolution.id/privkey.pem" + "cert": "", + "key": "" } }, "database": { @@ -26,6 +26,6 @@ "username": "bri_staging", "password": "fK*#o>1W2&6f", "database": "bri_erp_staging", - "logging": false + "logging": true } } diff --git a/src/helpers/orm.ts b/src/helpers/orm.ts index c7735ab..75999a9 100644 --- a/src/helpers/orm.ts +++ b/src/helpers/orm.ts @@ -19,7 +19,7 @@ export class OrmHelper { password: String(config.get("database.password")), database: String(config.get("database.database")), synchronize: true, - logging: true, + logging: config.get('database.logging'), entities: [Product, Branch, Menu, Administrativu, Aldeia, ClassEconomi, District, IncomeTier, Munisipo, Suco, Category, Target, Application], subscribers: [], migrations: [],