From 523d0f310aba7238f23b9c4d27e6a249da13280d Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Tue, 31 Oct 2023 09:35:29 +0330 Subject: [PATCH] update ecosystem.config.js --- .gitignore | 3 ++- ecosystem.config.js.example | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 ecosystem.config.js.example diff --git a/.gitignore b/.gitignore index 662e667..1e62a6d 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,5 @@ cypress/screenshots .env* .env .idea -package-lock.json \ No newline at end of file +package-lock.json +ecosystem.config.js \ No newline at end of file diff --git a/ecosystem.config.js.example b/ecosystem.config.js.example new file mode 100644 index 0000000..6847796 --- /dev/null +++ b/ecosystem.config.js.example @@ -0,0 +1,18 @@ +module.exports = { + apps: [{ + name: "crm_app", + script: 'node_modules/next/dist/bin/next', // cluster mode run with node only, not npm + args: 'start -p 3003', + exec_mode: "cluster", // default fork + instances: "10", + kill_timeout: 4000, + wait_ready: true, + autorestart: true, + watch: false, + max_memory_restart: "1G", + log_date_format: "YYYY-MM-DD HH:mm Z", + env_prod: { + APP_ENV: 'prod' // APP_ENV=prod + } + }], +}; \ No newline at end of file