5

似乎是一个相当简单的问题,但似乎无法弄清楚。我一直在遵循 Heroku 的 Django 说明(https://devcenter.heroku.com/articles/django#using-a-different-wsgi-server)

我正在尝试创建一个 Procfile,使用 Foreman start 在本地运行它。我已经下载并安装了 Gunicorn 和 Gevent,在我的根目录中手动添加了一个名为 Procfile 的 .txt 文件(让我知道是否有更好的方法来执行此操作,然后添加新的文本文件并将其命名为 Procfile),但工头开始不断返回

 (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?

4

1 回答 1

18

Procfile 不应具有“.txt”扩展名。您已将其称为“Procfile.txt”。应该只是“Procfile”。

于 2012-11-02T10:10:25.083 回答