修改了pm2配置文件文件

This commit is contained in:
Xu Chang 2024-08-29 11:35:03 +08:00
parent feb268dc67
commit 98acb57eb1
3 changed files with 36 additions and 0 deletions

18
template/pm2.prod.js Normal file
View File

@ -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,
}
},
],
};

18
template/pm2.staging.js Normal file
View File

@ -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,
}
},
],
};