首页 > 解决方案 > python脚本的pm2 json文件格式

问题描述

我有一个在 python manage.py runserver 0:8000 --insecure 服务器上使用 PM2 执行的命令。我无法创建 JSON 文件格式,因此我可以使用该 json 文件运行而不是编写整个命令。

标签: pythonpython-3.xpm2

解决方案


生态系统.config.js:

module.exports = {
  apps : [{
     script: 'manage.py',
     args: 'runserver 0:8000 --insecure'
  }]
}

然后:

pm2 start ecosystem.config.js

推荐阅读