aboutsummaryrefslogtreecommitdiffstats
path: root/config/deploy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/deploy.rb')
-rw-r--r--config/deploy.rb19
1 files changed, 9 insertions, 10 deletions
diff --git a/config/deploy.rb b/config/deploy.rb
index 5e660434a..c73d16f53 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -13,17 +13,17 @@ set :git_enable_submodules, true
set :deploy_to, configuration['deploy_to']
set :user, configuration['user']
set :use_sudo, false
+set :rails_env, configuration['rails_env']
server configuration['server'], :app, :web, :db, :primary => true
-namespace :rake do
- namespace :themes do
- task :install do
- run "cd #{latest_release} && bundle exec rake themes:install RAILS_ENV=#{rails_env}"
- end
+namespace :themes do
+ task :install do
+ run "cd #{latest_release} && bundle exec rake themes:install RAILS_ENV=#{rails_env}"
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'
@@ -50,14 +50,13 @@ namespace :deploy do
"#{release_path}/config/general.yml" => "#{shared_path}/general.yml",
"#{release_path}/config/rails_env.rb" => "#{shared_path}/rails_env.rb",
"#{release_path}/config/newrelic.yml" => "#{shared_path}/newrelic.yml",
+ "#{release_path}/config/httpd.conf" => "#{shared_path}/httpd.conf",
"#{release_path}/config/aliases" => "#{shared_path}/aliases",
"#{release_path}/public/foi-live-creation.png" => "#{shared_path}/foi-live-creation.png",
"#{release_path}/public/foi-user-use.png" => "#{shared_path}/foi-user-use.png",
- "#{release_path}/public/favicon.ico" => "#{shared_path}/favicon.ico",
"#{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"
+ "#{release_path}/lib/acts_as_xapian/xapiandbs" => "#{shared_path}/xapiandbs",
}
# "ln -sf <a> <b>" creates a symbolic link but deletes <b> if it already exists
@@ -71,8 +70,8 @@ namespace :deploy do
end
end
-after 'deploy:update_code', 'deploy:symlink_configuration'
-after 'deploy:update_code', 'rake:themes:install'
+before 'deploy:assets:precompile', 'deploy:symlink_configuration'
+before 'deploy:assets:precompile', 'themes:install'
# Put up a maintenance notice if doing a migration which could take a while
before 'deploy:migrate', 'deploy:web:disable'