2013-07-11 66 views

回答

3

啊哈 - 讀取通過源極(deploy.rb

namespace :deploy do 
    desc <<-DESC 
    Deploys your project. This calls both `update' and `restart'. Note that \ 
    this will generally only work for applications that have already been deployed \ 
    once. For a "cold" deploy, you'll want to take a look at the `deploy:cold' \ 
    task, which handles the cold start specifically. 
    DESC 
    task :default do 
    update 
    restart 
    end 

所以,deploy做了一個update,然後restart

update只是執行服務器上的更新。

3

更新增加了一個新版本的文件夾,並改變符號鏈接,但不會重新啓動。如果您從服務器運行遷移,這很有用。例如,我們不允許遠程數據庫訪問,以便在遷移時進行部署,我們使用cap deploy:update,然後登錄到服務器並運行遷移,然後限制部署:重新啓動。

如果你想後臺作業,(例如cron作業,而不是長期運行的守護進程)拿起新的代碼更改,而無需重新啓動Web處理程序也可以是有用的。