[英]Deploying a html file website in heroku
我已經使用html,css,bootstrap和javascript文件構建了一個小型網站。 主頁是index.html。 我試圖將其部署到我的heroku應用程序(buildpack是nodejs),但每次都說:該應用程序與buildpack不兼容。 如何在那里上傳我的網站?
它顯示了以下內容:
D:\Projects\herokudeploy>git push heroku master Counting objects: 572, done. Delta compression using up to 4 threads. Compressing objects: 100% (477/477), done. Writing objects: 100% (572/572), 17.28 MiB |
48.00 KiB/s, done. Total 572 (delta 58), reused 570 (delta 57)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack:
https://github.com/heroku/heroku-buildpack-static.git
remote: More info:
https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to sobhannwebsite.
remote:
To *heroku url address*
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to *heroku url address*
設置節點應用程序時,Heroku會期望您部署節點應用程序。 目前,我不認為您可以在Heroku上投入大量HTML和CSS並運行它。 您需要Python,NodeJS,Go等服務器才能運行您的應用程序。
您使用的靜態buildpack要求static.json
文件是可運行的。 該文件必須位於存儲庫的根目錄下。
您應該能夠將該文件的內容設置為空哈希{}
。
GitHub上的buildpack自述文件提供了您可以在該文件中為靜態站點設置的所有配置。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.