[英]Heroku not loading procfile
我已經嘗試了其他人的解決方案來使procfile受到認可,但它對我不起作用。 我對如何讓heroku識別我的Procfile感到非常困惑! 我已經將其移動到其他文件夾中,但是它只是無法識別它。
web: waitress-serve --port=$PORT alex1.wsgi:application
這是我的代碼。 它位於我的requirements.txt文件旁邊,heroku很好地將其拾取。 使用echo創建文件,甚至echo無法正常工作。
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加載文件。 沒有收到錯誤,不確定如何訪問錯誤日志,但是現在將嘗試解決問題。
我建議的第一點是將.idea
目錄放在.gitignore
文件中。
我已經在heroku上上傳了您的應用程序,結果Procfile
已成功添加。
腳步:
git add .
在您的根目錄中 git commit -m "init commit"
heroku create
git push heroku master
之后,我通過heroku open
命令啟動了您的應用程序,並收到500
錯誤。
我希望這個答案會有用,也請閱讀有關在heroku上部署的信息
UPD:請檢查您是否在項目的根目錄中使用git init
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.