Skip to content

Instantly share code, notes, and snippets.

@srockstyle
Created March 12, 2013 22:42
Show Gist options
  • Save srockstyle/5147764 to your computer and use it in GitHub Desktop.
Save srockstyle/5147764 to your computer and use it in GitHub Desktop.
capistranoの初期設定&デプロイ手順。
# 初期設定(アプリ毎に行う)
cd /pathtoapps/app
capify .
[add] writing `./Capfile'
[add] writing `./config/deploy.rb'
[done] capified!
# deploy.rbを編集する
cap deploy:setup
# サーバ側でdatabase.ymlのシンボリックリンクもとや、
# デプロイ毎に変えてはいけないファイルを編集する。
cap deploy:cold
# 以後は以下。
cap deploy
# gitとあわせた使い方
git add -f ./*
git commit -m "修正"
git push origin master
cap deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment