【问题标题】:pm2 json file format for python scriptpython脚本的pm2 json文件格式
【发布时间】:2018-12-14 01:09:35
【问题描述】:

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

【问题讨论】:

    标签: python python-3.x pm2


    【解决方案1】:

    生态系统.config.js:

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

    然后:

    pm2 start ecosystem.config.js
    

    【讨论】:

    • 我必须创建一个名称为 Ecosystem.config.js 的文件??并将以下数据放入其中。对吗?
    • 是的,在与您的应用程序相同的文件夹中创建生态系统.config.js 并将其放入其中更多信息:pm2.io/doc/en/runtime/reference/ecosystem-file
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-22
    • 2018-08-13
    • 2018-05-07
    • 1970-01-01
    相关资源
    最近更新 更多