本文介绍了Procfile声明类型 - > (无)在Heroku中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我被困在通过Procfile在Heroku上运行Django 1.4应用程序。我已阅读所有相关帖子,我确定这不是一个大小写敏感的相关问题,因为我正确地命名为Procfile。这是我的项目结构。通知Procfile与manage.py相同。 。 ├──README.md ├──docs ├──项目│├──程序文件│├──客户端││ ├──__init__.py ││├──__init __。pyc ││├──models.py ││├──模板│││└── welcome.html ││├──tests.py ││├──views.py ││└──views.pyc │├──manage.py │└──wings │├──__init__.py │├──__init __。pyc │├──settings.py │├── settings.pyc │├──urls.py │├──urls.pyc │├──wsgi.py │└──wsgi.pyc ├──requirements.txt ├──static │├──css │├──images │└└──js ├──测试└ ──上传 以下是Procfile: web:python manage.py runserver 这里输出(工作正常) 10:29:28 web.1 |以pid开头595 我推动heroku: Procfile声明类型 - > (none) 试图通过heroku toolbelt对其进行缩放: $ heroku ps:缩放web = 1 --app myapp 缩放web进程...失败!找不到记录。 我总是通过网络创建我的应用程序,所以我总是需要放置--app参数。可能是与我如何创建我的应用程序有关的任何问题? 我也尝试了以下操作: MacBook-Pro-de-Sergio:myapp sergio $ heroku运行python project / manage.py runserver 运行连接到终端的python project / manage.py runserver...运行.1 验证模型... 0找到错误 Django版本1.4,使用设置'wings.settings'开发服务器运行在http:// 127.0.0.1:8000/ 使用CONTROL-C退出服务器。 这是我的应用程序的日志: 2012-07-18T09:18:51 + 00:00 heroku [run.1]:用命令`python project / manage.py runserver`启动进程 2012- 07-18T09:18:51 + 00:00 heroku [run.1]:状态从开始改为 2012-07-18T09:19:16 + 00:00 heroku [router]:错误H14(No正在运行的Web进程) - > GET peoplewings.herokuapp.com/ dyno = queue = wait = service = status = 503 bytes = 2012-07-18T09:19:16 + 00:00 heroku [router]:错误H14(没有web进程运行) - > GET peoplewings.herokuapp.com/favicon.ico dyno = queue = wait = service = status = 503 bytes = 我还必须将Procfile上的主机和端口设置为默认Web服务器点数,为127.0.0.1:8000,这对heroku无效 web:python project / manage.py runserver 0.0.0.0:$PORT 解决方案您的Procfile需要位于推送到Heroku的git存储库的根目录中。 I'm stuck in running a Django 1.4 app on Heroku via Procfile. I've read all the related posts and I'm sure this is not a case sensitive related issue as I named correctly to Procfile. This is my project structure. Notice Procfile is at the same level that manage.py.├── README.md├── docs├── project│ ├── Procfile│ ├── client│ │ ├── __init__.py│ │ ├── __init__.pyc│ │ ├── models.py│ │ ├── templates│ │ │ └── welcome.html│ │ ├── tests.py│ │ ├── views.py│ │ └── views.pyc│ ├── manage.py│ └── wings│ ├── __init__.py│ ├── __init__.pyc│ ├── settings.py│ ├── settings.pyc│ ├── urls.py│ ├── urls.pyc│ ├── wsgi.py│ └── wsgi.pyc├── requirements.txt├── static│ ├── css│ ├── images│ └── js├── tests└── uploadsHere is the Procfile:web:python manage.py runserverHere the output of foreman running it locally (works fine)10:29:28 web.1 | started with pid 595I'm getting this on the push to heroku:Procfile declares types -> (none)Trying to scale it via heroku toolbelt:$ heroku ps:scale web=1 --app myappScaling web processes... failed! Record not found.I always create my apps via web, so I need always to put the --app argument. Might be any issue related to how I create my apps?I also tried the following:MacBook-Pro-de-Sergio:myapp sergio$ heroku run python project/manage.py runserverRunning `python project/manage.py runserver` attached to terminal... up, run.1Validating models...0 errors foundDjango version 1.4, using settings 'wings.settings'Development server is running at http://127.0.0.1:8000/Quit the server with CONTROL-C.This are the logs of my app:2012-07-18T09:18:51+00:00 heroku[run.1]: Starting process with command `python project/manage.py runserver`2012-07-18T09:18:51+00:00 heroku[run.1]: State changed from starting to up2012-07-18T09:19:16+00:00 heroku[router]: Error H14 (No web processes running) -> GET peoplewings.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=2012-07-18T09:19:16+00:00 heroku[router]: Error H14 (No web processes running) -> GET peoplewings.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=AnswerAs Neil pointed out Procfile should be in the root of git repo.I also had to set the host and port on Procfile as default web server points to 127.0.0.1:8000 which will not work on herokuweb: python project/manage.py runserver 0.0.0.0:$PORT 解决方案 Your Procfile needs to be in the root of your git repository that is pushed to Heroku. 这篇关于Procfile声明类型 - > (无)在Heroku中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!