2016-08-20 14 views
1

我將3個Node.js應用程序移動到Web IDE中的文件夾中,因爲我想對其進行邏輯分組,而不一定要更改部署。 所有這三個應用程序都有自己的URL。將3個應用程序移動到一個文件夾後無法重新部署

顯然現在部署適用於所有3個應用程序的組合。點擊部署箭頭後

錯誤:

"An app was not successfully detected by any available buildpack" 

我適應的啓動配置:

  • 添加的服務
  • 補充說: 「故宮開始」

仍我得到這個錯誤。

其中一個應用程序沒有manifest.yml。

當我點擊app.js,我有時會收到以下錯誤(在一個大紅色的彈出窗口):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style> body{ margin:0px; padding:0px; background-color: #ffffff; color:#000; font-family:Arial,Verdana,Helvetica,Tahoma,sans-serif; } #content { font-size: 1em; margin-left: 1em; margin-right: 1em; padding: 1em; } h4.basichead { font-family:Arial,Verdana,Helvetica,Tahoma,sans-serif; } p { padding-top: .5em; } ul { line-height: 1.3em; } a:link { color: #c00000 } a:visited { color: #c00000 } #page { 
border: 7px; padding: 7px } #box { 
.... 

登錄:

Updated app with guid 998e32e6-3f4f-4743-8e36-f8cd4c0961bb ({"name"=>"ACP", "command"=>"PRIVATE DATA HIDDEN", "instances"=>1, "memory"=>1024, "environment_json"=>"PRIVATE DATA HIDDEN"}) 
Updated app with guid 998e32e6-3f4f-4743-8e36-f8cd4c0961bb ({"route"=>"8e8a376d-479e-4b4f-921e-932e40fd569f"}) 
Updated app with guid 998e32e6-3f4f-4743-8e36-f8cd4c0961bb ({"console"=>true, "state"=>"STOPPED"}) 
Got staging request for app with id 998e32e6-3f4f-4743-8e36-f8cd4c0961bb 
Updated app with guid 998e32e6-3f4f-4743-8e36-f8cd4c0961bb ({"console"=>true, "state"=>"STARTED"}) 
-----> Downloaded app package (6.6M) 
encountered error: An app was not successfully detected by any available buildpack 

不幸的是我不能動出於某種原因,應用程序也會回到根目錄。

回答

3

您收到錯誤An app was not successfully detected by any available buildpack,因爲Bluemix無法確定您嘗試部署的應用程序類型。每個buildpack都有它自己的檢測腳本,並且它們都不符合您的3 Node.js應用程序/文件夾的項目結構的帳單。

我會建議嘗試將單個manifest.yml文件放在項目的根目錄(或者您運行cf push的位置),該文件會告知雲代工廠您的意圖。

您可以指定一次推送多個應用程序。一個例子manifest.yml:

--- 
# this manifest deploys two applications 
# apps are in flame and spark directories 
# flame and spark are in fireplace 
# cf push should be run from fireplace 
applications: 
- name: spark 
    host: flint-99 
    path: ./spark/ 
- name: flame 
    host: burnin-77 
    path: ./flame/ 

關於推動多個應用程序到Cloud Foundry Here更多信息。

+0

非常感謝,非常感謝 – jpsstack

相關問題