From 4fcc402212d16916233ba44095b61f96c3a3eae2 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Fri, 18 Jul 2014 16:25:44 +0100 Subject: Update post-install commands section --- docs/installing/manual_install.md | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'docs/installing/manual_install.md') diff --git a/docs/installing/manual_install.md b/docs/installing/manual_install.md index 23b8ea1b6..c84600e6a 100644 --- a/docs/installing/manual_install.md +++ b/docs/installing/manual_install.md @@ -337,24 +337,38 @@ for both local and remote analysis. ## Deployment -In the `alaveteli` directory, run: +You should run the `rails-post-deploy` script after each new software upgrade: - script/rails-post-deploy + sudo -u alaveteli RAILS_ENV=production \ + /var/www/alaveteli/script/rails-post-deploy -This sets up directory structures, creates logs, installs/updates themes, runs -database migrations, etc. You should run it after each new software update. +This sets up installs Ruby dependencies, installs/updates themes, runs database +migrations, updates shared directories and runs other tasks that need to be run +after a software update. -One of the things the script does is install dependencies (using `bundle -install`). Note that the first time you run it, part of the `bundle install` -that compiles `xapian-full` takes a *long* time! +That the first time you run this script can take a *long* time, as it must +compile native dependencies for `xapian-full`. -Next, create the index for the search engine (Xapian): +Precompile the static assets: - script/rebuild-xapian-index + sudo -u alaveteli \ + bash -c 'RAILS_ENV=production cd /var/www/alaveteli && \ + bundle exec rake assets:precompile' + +Create the index for the search engine (Xapian): + + sudo -u alaveteli RAILS_ENV=production \ + /var/www/alaveteli/script/rebuild-xapian-index If this fails, the site should still mostly run, but it's a core component so you should really try to get this working. +
+ Note that we set RAILS_ENV=production. Use + RAILS_ENV=development if you are installing Alaveteli to make + changes to the code. +
+ ## Run the Server Run the following to get the server running: -- cgit v1.2.3