From 98acb57eb1cc32c0079d28dcb458a2f9c99fa819 Mon Sep 17 00:00:00 2001 From: "Xc@centOs" Date: Thu, 29 Aug 2024 11:35:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86pm2=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/{ecosystem.config.js => pm2.dev.js} | 0 template/pm2.prod.js | 18 ++++++++++++++++++ template/pm2.staging.js | 18 ++++++++++++++++++ 3 files changed, 36 insertions(+) rename template/{ecosystem.config.js => pm2.dev.js} (100%) create mode 100644 template/pm2.prod.js create mode 100644 template/pm2.staging.js diff --git a/template/ecosystem.config.js b/template/pm2.dev.js similarity index 100% rename from template/ecosystem.config.js rename to template/pm2.dev.js diff --git a/template/pm2.prod.js b/template/pm2.prod.js new file mode 100644 index 0000000..0838258 --- /dev/null +++ b/template/pm2.prod.js @@ -0,0 +1,18 @@ +module.exports = { + apps: [ + { + name: 'oak-template-server', + script: './scripts/startServer.js', + instances: '10', + exec_mode: 'cluster', + log_date_format: 'YYYY-MM-DD HH:mm:ss Z', + increment_var: "OAK_INSTANCE_ID", + env: { + OAK_PLATFORM: 'server', + NODE_ENV: 'production', + OAK_INSTANCE_CNT: 10, + OAK_INSTANCE_ID: 0, + } + }, + ], +}; \ No newline at end of file diff --git a/template/pm2.staging.js b/template/pm2.staging.js new file mode 100644 index 0000000..5d6f410 --- /dev/null +++ b/template/pm2.staging.js @@ -0,0 +1,18 @@ +module.exports = { + apps: [ + { + name: 'oak-template-server', + script: './scripts/startServer.js', + instances: '2', + exec_mode: 'cluster', + log_date_format: 'YYYY-MM-DD HH:mm:ss Z', + increment_var: "OAK_INSTANCE_ID", + env: { + OAK_PLATFORM: 'server', + NODE_ENV: 'staging', + OAK_INSTANCE_CNT: 2, + OAK_INSTANCE_ID: 0, + } + }, + ], +}; \ No newline at end of file