instead of the standard capistrano deploy flow for a rails app, I just want mine to login to my server via ssh (I have a key setup), cd to the app, run svn update, run migrations and then restart Passenger.
However, I am having difficulty finding any good do开发者_Go百科cumentation to start me along the right path.
Any ideas?
Wouldn't it be something like this?
namespace :deploy do
task :upgrade, :roles => [:app] do
invoke_command "cd #{current_path} && svn up"
invoke_command "cd #{current_path} && rake db:migrate RAILS_ENV=production"
invoke_command "cd #{current_path} && touch tmp/restart.txt"
end
end
Could be cleaner I guess...
The wiki is quite good: https://github.com/capistrano/capistrano/wiki
精彩评论