1.安装pm2:
npm install -g pm2
2.在启动文件夹内新建文件processes.json:
{
"apps": [
{
"name": "schedulingBack",
"cwd": "/root/zdy/project/schedulingBack",
"script": "bin/www",
"log_date_format": "YYYY-MM-DD HH:mm Z",
"error_file": "/root/zdy/log/node-app.stderr.log",
"out_file": "log/node-app.stdout.log",
"pid_file": "pids/node-geo-api.pid",
"instances": 6,
"min_uptime": "200s",
"max_restarts": 10,
"max_memory_restart": "1024M",
"cron_restart": "1 1 1 * *",
"watch": false,
"merge_logs": true,
"exec_interpreter": "node",
"exec_mode": "fork",
"autorestart": false,
"vizion": false
}
]
}
手机扫一扫
移动阅读更方便
你可能感兴趣的文章