我正在尝试部署一个简单的 Django 应用程序。我有一个requirements.txt 文件,其中声明了许多依赖项。当我推送到heroku时,它说它正在安装我声明的依赖项:
Downloading/unpacking gunicorn==19.1.1 (from -r requirements.txt (line 9))
Running setup.py (path:/tmp/pip_build_u52128/gunicorn/setup.py) egg_info for package gunicorn
但是,当我运行命令“heroku ps:scale web=1”(按照heroku教程中的建议)时,我得到以下输出:
Scaling dynos... done, now running web at 1:1X.
当我检查“heroku ps”时,我得到以下输出:
=== web (1X): gunicorn poem_maker.wsgi:application
web.1: crashed 2015/01/08 10:46:14 (~ 3m ago)
查看日志,我看到以下输出:
2015-01-08T06:46:14.481013+00:00 heroku[web.1]: Starting process with command gunicorn poem_maker.wsgi:application
2015-01-08T06:46:15.214361+00:00 app[web.1]: bash: gunicorn: command not found
在我看来,我这样做是正确的——应该找到gunicorn命令!
谢谢
院长
最佳答案
我认为问题出在运行时 Procfile 中的这一行
gunicornpoem_maker.wsgi:application
尝试使用web:gunicornpoem_maker.wsgi
。
关于django - 使用heroku部署django应用程序——gunicorn未安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27834574/