1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# Using the plugin load 'vendor/plugins/thinking-sphinx/lib/thinking_sphinx/deploy/capistrano' # If using the ThinkingSphinx gem, use the following instead. # require 'thinking_sphinx/deploy/capistrano' set :application, "appname" set :domain, "www.myserver.com" set :deploy_to, "/app/directory" set :user, "root" set :repository, "http://www.example.com/svn//trunk" role :web, domain role :app, domain role :db, domain, :primary => true namespace :deploy do desc "Restart the app" task :restart, :roles => :app do # This regen's the config file, stops Sphinx if running, then starts it. # No indexing is done, just a restart of the searchd daemon # thinking_sphinx.running_start # The above does not re-index. If any of your define_index blocks # in your models have changed, you will need to perform an index. # If these are changing frequently, you can use the following # in place of running_start # thinking_sphinx.stop # thinking_sphinx.index # thinking_sphinx.start # Restart the app run "touch /tmp/restart.txt" end desc "Cleanup older revisions" task :after_deploy do cleanup end end after "deploy:setup", "thinking_sphinx:shared_sphinx_folder" |

