我嘗試在http://www.playframework.com/documentation/2.3.x/ProductionHeroku上描述的部署Play Framework 2.3.0應用程序到Heroku。Play Framework 2.3在Heroku上工作嗎?
我的簡單應用程序在本地運行沒有任何問題,推送/部署到Heroku並沒有顯示任何錯誤跡象。
末推日誌:
[…]
-----> Building runtime environment
-----> Discovering process types
Procfile declares types -> (none)
done, 11.0MB
done, v4
http://xxxxxxxxxxx.herokuapp.com/ deployed to Heroku
To [email protected]:xxxxxxxxxxx.git
f1c57d6..6bb0df3 master -> master
updating local tracking ref 'refs/remotes/heroku/master'
當我打開網頁,我得到Heroku的「應用程序錯誤」頁面(不玩的一個錯誤頁)。
如果我運行heroku ps
沒有進程列出(只是沒有)。
這是我的第一個Heroku部署。我以某種方式感受到Heroku不知道如何啓動Play應用程序,因爲從2.3開始,play
命令更改爲activator
。
還有一件事:我注意到,在Heroku儀表板>應用程序>設置>信息它說「框架:Node.js」,這有點奇怪,雖然我在項目中使用Bower。
任何想法?非常感謝!
UPDATE:實際的問題是,Heroku的認爲我的應用程序是一個Node.js的應用程序,只要我有一個package.json
文件在我的倉庫沒有被編譯。只要我刪除它並提交所有依賴項(bower_components
目錄)到存儲庫一切都很好。我將不得不找到一種方法來運行Bower更新並在推送時編譯Play Framework ...
你可以用'Heroku的配置專門設置的遊戲框架構建包buildpack-scala.git',然後你應該可以恢復你的package.json文件 – catsby