oa_based/ecosystem.config.js

23 lines
410 B
JavaScript
Raw Normal View History

2024-02-28 08:32:35 +08:00
const { cpus } = require('os')
const cpuLen = cpus().length
module.exports = {
apps: [
{
2024-02-28 11:53:50 +08:00
name: 'huaxin-admin',
2024-02-28 08:32:35 +08:00
script: './dist/main.js',
autorestart: true,
exec_mode: 'cluster',
watch: false,
2024-03-07 16:28:03 +08:00
instances: cpuLen,
2024-02-28 08:32:35 +08:00
max_memory_restart: '520M',
args: '',
env: {
NODE_ENV: 'production',
PORT: process.env.APP_PORT,
},
},
],
}