Created
August 8, 2012 15:43
-
-
Save everm1nd/3296079 to your computer and use it in GitHub Desktop.
Capistrano: Solr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :before_update_code do | |
#stop solr: | |
run "cd #{current_path} && rake sunspot:solr:stop RAILS_ENV=#{rails_env}" | |
end | |
after "deploy:update_crontab", "deploy:solr:symlink" | |
namespace :solr do | |
desc <<-DESC | |
Symlink in-progress deployment to a shared Solr index. | |
DESC | |
task :symlink, :except => { :no_release => true } do | |
run "ln -nfs #{shared_path}/solr #{current_path}/solr" | |
run "ls -al #{current_path}/solr/pids/" | |
run "cd #{current_path} && rake sunspot:solr:start RAILS_ENV=#{rails_env}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment