From d4e5812d181b460006a0a95d11c4fd7fcf6f1004 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Mon, 30 Oct 2023 15:16:33 +0330 Subject: [PATCH] implementation of ecosystem.config.js --- .gitignore | 33 +++++++++++++++++++++++++++++++-- ecosystem.config.js.example | 18 ++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 ecosystem.config.js.example diff --git a/.gitignore b/.gitignore index 78b977c..1e62a6d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,34 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory node_modules +cypress/videos +cypress/screenshots .next -.env.local +.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..983fa1c --- /dev/null +++ b/ecosystem.config.js.example @@ -0,0 +1,18 @@ +module.exports = { + apps: [{ + name: "loan facilities expert", + script: 'node_modules/next/dist/bin/next', // cluster mode run with node only, not npm + args: 'start', + exec_mode: "cluster", // default fork + instances: "max", + 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