ghost使用pm2管理启动

2017-06-09 / 0 评论 / 230 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2021年10月27日,已超过884天没有更新,若内容或图片失效,请留言反馈。

以前运行ghost使用forever管理启动,但是现在发现pm2管理nodejs程序更好,遂尝试改造

代码如下

pm2.json

{
  "apps": [{
    "name": "ghost",
    "script": "index.js",
    "cwd": "/data/wwwroot/blog.minws.com",
    "exec_mode": "cluster",
    "instances": 0,
    "max_memory_restart": "256M",
    "autorestart": true,
    "node_args": [],
    "args": [],
    "env": {
      "NODE_ENV": "production"
    }
  }]
}

启动

pm2 start pm2.json

<br/>

0

评论 (0)

取消