2017-10-04 168 views
0

我试过其他人的解决方案,以得到那里procfile承认,它只是不适合我。真的很困惑我如何能让heroku识别我的Procfile!我已经将它移到不同的文件夹中,但它只是不会识别它。Heroku not loading procfile

web: waitress-serve --port=$PORT alex1.wsgi:application 

这是我的代码。它正好坐在我的requirements.txt文件旁边,这个文件正在被heroku收拾好。使用回声创建文件或甚至回声不起作用。

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

这样的伤感,很多都是疯狂的。

编辑 把它们放在目录的顶部 - 仍然不起作用。

这里是错误日志。

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

为了回应Mike的观点,我通过他的例子,我达到了这一点。

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 cli加载文件。没有收到错误,不确定如何访问错误日志,但现在尝试解决问题。

+0

无论是Procfile和requirements.txt应该在顶层。 –

+0

当把它放在顶层时,它仍然不能识别它。 –

+0

这是一个疯狂的猜测,但Procfile上的权限是什么? –

回答

2

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

我上传了你的应用程序在heroku上,结果 - Procfile已成功添加。

步骤:

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

这是我的结果,但你可能会看到一些simila R键这样的: enter image description here enter image description here

后来我通过heroku open命令启动应用程序,并获得500错误。日志

截图 enter image description here

我希望这个答案将是有益的,也了解deploy on heroku

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

+0

谢谢迈克!早上在澳大利亚很晚才会检查一下,但对我来说这是一个很好的开始,可以让我了解正在发生的事情! –

+0

欢迎;),请写下你的结果;) –

+0

固定为什么我不能制作应用程序,现在将看到结果,即将更新! –