diff --git a/ecosystem.config.js b/ecosystem.config.js index 0233c209..98e8f0ce 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -14,7 +14,7 @@ module.exports = { exec_mode: 'cluster', watch: false, instances: cpuLen, - max_memory_restart: '200M', + max_memory_restart: '220M', args: '--color --encrypt_enable', env: { NODE_ENV: 'production', diff --git a/ecosystem.dev.config.js b/ecosystem.dev.config.js index 5554f188..276a2bef 100644 --- a/ecosystem.dev.config.js +++ b/ecosystem.dev.config.js @@ -12,7 +12,7 @@ module.exports = { exec_mode: 'cluster', watch: false, instances: 2, - max_memory_restart: '200M', + max_memory_restart: '220M', args: '--color --encrypt_enable', env: { NODE_ENV: 'development', diff --git a/pm2.dev.config.js b/pm2.dev.config.js deleted file mode 100644 index b037149b..00000000 --- a/pm2.dev.config.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - apps: [ - { - name: 'mx-server', - script: 'dist/src/main.js', - autorestart: true, - exec_mode: 'cluster', - instances: 2, - watch: false, - - max_memory_restart: '230M', - env: { - DEBUG_COLORS: true, - NODE_ENV: 'development', - }, - - args: '--allowed_origins=dev.* --cluster --color', - }, - ], -} diff --git a/src/migration/helper/encrypt-configs.ts b/src/migration/helper/encrypt-configs.ts index b541351b..77b14311 100644 --- a/src/migration/helper/encrypt-configs.ts +++ b/src/migration/helper/encrypt-configs.ts @@ -2,6 +2,7 @@ import { plainToInstance } from 'class-transformer' import 'reflect-metadata' +import { ENCRYPT } from '~/app.config' import { register } from '~/global/index.global' import { generateDefaultConfig } from '~/modules/configs/configs.default' import * as optionDtos from '~/modules/configs/configs.dto' @@ -9,6 +10,8 @@ import { encryptObject } from '~/modules/configs/configs.encrypt.util' import { IConfig, IConfigKeys } from '~/modules/configs/configs.interface' import { getDatabaseConnection } from '~/utils/database.util' +console.log(ENCRYPT) + const allOptionKeys: Set = new Set() Object.entries(optionDtos).reduce((obj, [key, value]) => { const optionKey = (key.charAt(0).toLowerCase() +