2014-06-19 50 views
0

我嘗試在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 ...

+0

你可以用'Heroku的配置專門設置的遊戲框架構建包buildpack-scala.git',然後你應該可以恢復你的package.json文件 – catsby

回答

0

日誌是否提供了有用的信息?在部署或啓動應用程序時運行heroku logs -t -a <app_name>以查看日誌。你有沒有定義一個Procfile?

一些方便的文檔鏈接:

+0

似乎沒有進程正在運行。一切似乎都很好(「'Slug編譯完成」等),但在日誌中:'2014-06-19T13:48:35.803786 + 00:00 heroku [router]:at = error code = H14 desc =「No Web進程正在運行「method = GET path =」/「host = .......' – Nick

+0

該消息表明您沒有任何Procfile,可能是沒有指定Web的Procfile,或者您根本沒有旋轉打開一個網絡測試儀:'$ heroku ps:scale web = 1 -a ' – catsby

+0

我一定錯過了,正如在文檔中的「連接到數據庫」一節所述。我現在用下面的內容創建了一個'Procfile':'web:target/universal/stage/bin/FILENAME -Dhttp.port = $ {PORT}',但是日誌中顯示'bash:target/universal/stage/bin/FILENAME:沒有這樣的文件或目錄。當我在本地運行'play clean stage'時,我得到一個'target/universal/stage/bin/FILENAME',它正好在我的Procfile中被命名。我應該在登錄時能夠找到這個文件嗎('heroku run bash')?因爲根本沒有'target'目錄。 – Nick

0

使用heroku-buildpack-multi

您.buildpacks文件的內容應該是這樣的:設置BUILDPACK_URL = HTTPS://github.com/heroku/heroku-

https://github.com/heroku/heroku-buildpack-nodejs 
https://github.com/heroku/heroku-buildpack-scala 
相關問題