diff options
author | Henare Degan <henare.degan@gmail.com> | 2012-09-12 08:57:44 +1000 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2012-09-12 08:57:44 +1000 |
commit | 80a8f4447a68f22545d7c5356b44982eabca68a6 (patch) | |
tree | 040c387c1206f916bd5bac02a28be23178abfb1a /config/deploy.rb | |
parent | 2fe8639f132d69a290d7a51963c2f857a58662a8 (diff) |
Add Xapian config to Capistrano
Diffstat (limited to 'config/deploy.rb')
-rw-r--r-- | config/deploy.rb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/config/deploy.rb b/config/deploy.rb index ea395c37c..888710f83 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -24,6 +24,14 @@ namespace :rake do end end +# Not in the rake namespace because we're also specifying app-specific arguments here +namespace :xapian do + desc 'Rebuilds the Xapian index as per the ./scripts/rebuild-xapian-index script' + task :rebuild_index do + run "cd #{current_path} && bundle exec rake xapian:rebuild_index models='PublicBody User InfoRequestEvent' RAILS_ENV=#{rails_env}" + end +end + namespace :deploy do desc "Restarting mod_rails with restart.txt" task :restart, :roles => :app, :except => { :no_release => true } do @@ -39,10 +47,11 @@ namespace :deploy do task :symlink_configuration do links = { "#{release_path}/config/database.yml" => "#{shared_path}/database.yml", - "#{release_path}/config/general.yml" => "#{shared_path}/general.yml", - "#{release_path}/files" => "#{shared_path}/files", - "#{release_path}/cache" => "#{shared_path}/cache", - "#{release_path}/public/download" => "#{release_path}/cache/zips/download" + "#{release_path}/config/general.yml" => "#{shared_path}/general.yml", + "#{release_path}/files" => "#{shared_path}/files", + "#{release_path}/cache" => "#{shared_path}/cache", + "#{release_path}/vendor/plugins/acts_as_xapian/xapiandbs" => "#{shared_path}/xapiandbs", + "#{release_path}/public/download" => "#{release_path}/cache/zips/download" } # "ln -sf <a> <b>" creates a symbolic link but deletes <b> if it already exists @@ -52,6 +61,7 @@ namespace :deploy do after 'deploy:setup' do run "mkdir -p #{shared_path}/files" run "mkdir -p #{shared_path}/cache" + run "mkdir -p #{shared_path}/xapiandbs" end end |