2
我一直在关注heroku django教程http://devcenter.heroku.com/articles/django,我一直在遇到以下问题。 当我运行heroku open
并去我的应用程序的网站,我总是得到一个Application Error
。当我看我的日志看下面几行:在Heroku上部署Django应用程序
2011-10-11T04:55:35+00:00 heroku[web.1]: Starting process with command `python hellodjango/manage.py runserver`
2011-10-11T04:55:35+00:00 app[web.1]: python: can't open file 'hellodjango/manage.py': [Errno 2] No such file or directory
我ProcFile
只包含web: python hellodjango/manage.py runserver
。
最后,当我在命令行使用foreman start
时,我的django应用程序在本地运行正常。
任何想法?谢谢
最终,我通过将ProcFile更改为“worker:python hellodjango/manage.py runserver”来实现它。我想我并不清楚Web下的内容以及ProcFile中的工作内容。 – randomletters
@randomletters不要做“worker:python hellodjango/manage.py runserver”你正在做的是从开发服务器运行项目。这会在运行一段时间后导致主要的缓存堆积。更何况,它可能会在生产几个小时后崩溃。让Heroku为你处理部署!按照CraigKerstiens的建议,尝试使用Fabric来推送/部署代码库和“heroku run”。 – Mykel