2017-10-04 150 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

固定爲什麼我不能製作應用程序,現在將看到結果,即將更新! –