django - 使用heroku部署django应用程序——gunicorn未安装

标签 django heroku gunicorn

我正在尝试部署一个简单的 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/

相关文章:

django - 模板渲染期间出错/无法解析某些字符

python - 在 Django 中使用 Tarantool 和 MySQL

ruby-on-rails - Rails Sass 媒体查询变量导致 Heroku 推送失败

python - 一个app能不能一小部分用gevent,还是整个app都要转过来?

python - 从 Django 创建 SQL 插入脚本以填充 PostgreSQL 数据库

django html2text anchor 破坏

ruby-on-rails - Heroku 到 AWS 的迁移建议

ruby-on-rails - 在本地运行的 heroku facebook 应用程序在 fb 登录时抛出阻塞帧错误

django - 使用 Gunicorn 在 Docker 中使用 Django 开发自动重新加载代码更改

python - Django + Gunicorn + Nginx : Bad Request (400) in Debug=True