首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Heroku不加载procfile

Heroku不加载procfile
EN

Stack Overflow用户
提问于 2017-10-04 10:49:31
回答 1查看 4.5K关注 0票数 0

我曾尝试过其他人的解决方案,以获得procfile的认可,但这对我来说并不管用。真搞不懂我怎么能让heroku认出我的Procfile!我把它移到不同的文件夹里什么的,但它就是认不出来。

代码语言:javascript
复制
web: waitress-serve --port=$PORT alex1.wsgi:application

这是我的密码。它就在我的requirements.txt文件旁边,被heroku捡到了。使用echo创建文件,甚至回显都无法工作。

https://github.com/Hewlbern/Videography-Website/tree/master/Alex1 <--我试图从它部署到heroku的github链接。可以看到我把它放在哪里,等等,如果有人能帮忙的话!

这么伤心,很多人都疯了。

编辑,把它们放在目录的顶端-仍然不工作。

这是错误日志。

代码语言:javascript
复制
-----> Python app detected
 !     Warning: Your application is missing a Procfile. This file tells Heroku how to run your application.
 !     Learn more: https://devcenter.heroku.com/articles/procfile
-----> Installing requirements with pip
-----> $ python manage.py collectstatic --noinput
       63 static files copied to '/tmp/build_b9ce82b65ae441b651c56911a7474859/Hewlbern-ConsultingPage-1720e65/djreact/static/root'.
-----> Discovering process types
       Procfile declares types -> (none)
-----> Compressing...
       Done: 64.3M
-----> Launching...
       Released v19
       https://consultingpage.herokuapp.com/ deployed to Heroku

作为对迈克以下观点的回应,我通过了他的例子,我达到了这一点。

代码语言:javascript
复制
C:\Users\Holbinator\Desktop\Software Dev\Alexandria>git push heroku master fatal: 'heroku' does not appear to be a git repository fatal: Could not read from remote repository. 

然后,我在根目录中重新执行Git Init,然后尝试从Github加载代码。,这导致了同样的问题。,我会把它放在我的编辑中。谢谢!我现在试着做你的方法,找出为什么在这种情况下我不能。

编辑两个

现在我意识到我需要删除一个额外的heroku应用程序。现在使用heroku加载文件。没有收到错误,不确定如何访问错误日志,但现在将尝试解决该问题。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-10-04 11:49:43

我建议的第一点是将.idea目录放在.gitignore文件中。

我已经在heroku上上传了您的应用程序,因此-Procfile被成功地添加了。

步骤:

  1. 根目录中的git add .
  2. git commit -m "init commit"
  3. heroku create
  4. git push heroku master

这是我的结果,但您可能会看到类似的情况:

之后,我通过heroku open命令启动了您的应用程序,并收到了500错误。

原木截图

我希望这个答案是有用的,我也读过关于部署在heroku的文章。

UPD:请检查您是否在项目的根目录中使用git init

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46562997

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档