2013-07-11 3 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은 다음 updaterestart 않습니다.

update은 서버에서 업데이트를 수행하기 만합니다.

3

업데이트는 새 릴리스 폴더를 추가하고 심볼릭 링크를 변경하지만 다시 시작하지 않습니다. 이는 서버에서 마이그레이션을 실행할 때 유용합니다. 예를 들어 원격 데이터베이스 액세스가 마이그레이션과 함께 배포되도록 허용하지 않으면 cap deploy : update를 사용하고 서버에 로그인하여 마이그레이션을 실행 한 다음 deploy : restart를 제한합니다.

웹 처리기를 다시 시작하지 않고도 백그라운드 작업 (예 : 장기 실행 데몬이 아닌 cron 작업)에서 새 코드 변경 사항을 가져 오려면이 방법이 유용 할 수 있습니다.