On Dec 14, 2010, at 2:10 PM, craayzie wrote: > I've done some searching on a guide for how to use capistrano + git + > bundler to deploy radiant 0.9.1 but haven't had much success in > finding something comprehensive. Is deploying radiant the same as > deploying a Rails app?
Our cap recipes don't differ that much from a standard Rails app. Most of the additions are rake tasks, and we do overwrite deploy:migrate, so that existing Rails-based cap tasks and hooks will still fire in the right sequence. If you're deploying to different environments or servers, I'd recommend using the capistrano-ext gem. It lets you do this: $ cap staging deploy $ cap production deploy You can tailor your recipes and cap variables based on the environment. Here's the relevant parts of our Radiant recipe: Capistrano::Configuration.instance.load do namespace :radiant do desc "Updates extension assets" task :update_assets do run "cd #{current_path} && rake radiant:extensions:update_all RAILS_ENV=#{stage}" end after 'deploy:symlink', 'radiant:update_assets' desc "Migrates Radiant extensions" task :migrate_extensions do run "cd #{release_path} && rake db:migrate:extensions RAILS_ENV=#{stage}" end after 'deploy:migrate', 'radiant:migrate_extensions' end namespace :deploy do task :migrate, :roles => :db, :only => { :primary => true } do rake = fetch(:rake, "rake") rails_env = fetch(:rails_env, "production") migrate_env = fetch(:migrate_env, "") run "cd #{release_path}; #{rake} RAILS_ENV=#{rails_env} #{migrate_env} db:migrate" end end end