这就是我的Procfile中的内容:

web: gunicorn --pythonpath meraki meraki.wsgi

当我这样做时,我会得到这个错误:
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

据我在回溯中所见,原因是:
ImportError: No module named wsgi

我在shell中做了foreman start,导入成功,没有错误。
为什么我不能启动import wsgi
项目结构:
meraki
  meraki
      //other apps
      meraki
          settings
          __init__.py
          celery.py
          views.py
          wsgi.py
      manage.py
  Procfile
  requirements
  requirements.txt

最佳答案

你遵循了一个不必要的复杂结构,把自己弄糊涂了您不需要外部meraki目录,procfile和requirements.txt应该与manage.py位于同一目录中。然后可以删除pythonpath参数,一切都应该正常。

10-02 02:35
查看更多