Foreman启动时找不到Procfile,部署Django应用到Heroku。

5
似乎是一个相当简单的问题,但我似乎无法解决它。我一直在遵循Heroku的Django指南(https://devcenter.heroku.com/articles/django#using-a-different-wsgi-server)。
我正在尝试创建一个Procfile,并使用Foreman start在本地运行它。我已经下载并安装了Gunicorn和Gevent,并手动添加了一个名为Procfile的.txt文件到我的根目录中(如果有更好的方法,请让我知道),但Foreman start仍然返回错误信息。
 (venv)c:\users\chris\hellodjango>foreman start    
 ERROR: Procfile does not exist.

这是我的目录:

hellodjango/
.gitignore
manage.py
requirements.txt
Procfile.txt
hellodjango/
    __init__.py
    __init__.pyc
    settings.py
    settings.pyc
    urls.py
    urls.pyc
    wsgi.py
    wsgi.pyc
venv/
    Include/
    Lib/
    Scripts/ 

我的 requirements.txt 文件内容如下:

Django==1.4.2
distribute==0.6.28
dj-database-url==0.2.1
psycopg2==2.4.5
wsgiref==0.1.2
gunicorn==0.15.0

我的 Procfile.txt 内容如下:

web: gunicorn hellodjango.wsgi -b 0.0.0.0:$PORT

我错过了什么,为什么我的应用程序无法找到 ProcFile?

有关在Heroku上部署的更多信息,请参见http://v3.mike.tig.as/blog/2012/02/13/deploying-django-on-heroku/。 - Pramod
请查看以下内容:https://dev59.com/0GUo5IYBdhLWcg3wvRpF - Augiwan
1个回答

18

Procfile 不应该有 '.txt' 扩展名。您命名为 'Procfile.txt'。 应该只使用 'Procfile'。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接