Django Heroku Foreman启动错误代码1

8

以下是按照 Django Heroku 入门页面的内容进行翻译。 https://devcenter.heroku.com/articles/django

在启动 Foreman 步骤中,Foreman 未正确运行。 ProcFile 内容如下:

web: gunicorn hellodjango.wsgi

需求内容:

Django==1.5.1
dj-database-url==0.2.1
gunicorn==0.17.4
psycopg2==2.4.5

请按照教程精确进入虚拟环境,gunicorn、procfile和requirements位于scripts目录下,wsgi.py文件位于hellodjango目录下的路径为C:\hellodjango2\newvirtualenv\Scripts\hellodjango

python和python/scripts位于pathfile中。

以下是输出结果。

(newvirtualenv) C:\hellodjango2\newvirtualenv\Scripts>foreman start
09:48:58 web.1  | started with pid 3580
09:48:58 web.1  | exited with code 1
09:48:58 system | sending SIGKILL to all processes

1
你正在使用 Windows 吗?请看:Gunicorn 不支持 Windows(类似的答案请看这里)。 - ItayB
1
看起来你正在使用Windows。如果需要的话,只需在计算机上安装一个Linux虚拟机并在其中使用即可。 - stormlifter
1个回答

0
根据今天的Heroku文档,建议您使用以下内容:
$ heroku local web

使用foreman的替代方式。您可以试试吗?

另一件事,您可以执行django本身以检查所有内容是否正常工作:python manage.py runserver,如果不起作用,请添加由该调用生成的traceback信息?


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