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