diff options
-rw-r--r-- | config/deploy.rb | 18 | ||||
-rw-r--r-- | doc/DEPLOY.md | 1 |
2 files changed, 15 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 diff --git a/doc/DEPLOY.md b/doc/DEPLOY.md index aaf0c777a..adeb0e113 100644 --- a/doc/DEPLOY.md +++ b/doc/DEPLOY.md @@ -23,6 +23,7 @@ These are the general steps required to get your staging server up and running: * Edit those files to match your required settings * Back on your machine run `cap deploy` and it should successfully deploy * Run the DB migrations `cap deploy:migrate` +* Build the Xapian DB `cap xapian:rebuild_index` * Configure Apache/Passenger with a DocumentRoot of `your_deploy_to/current/public` * Phew. Time to admire your work by browsing to the server! |