diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-07-18 16:25:44 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-08-21 17:38:18 +0100 |
commit | 4fcc402212d16916233ba44095b61f96c3a3eae2 (patch) | |
tree | ac25f09e4370fc447c8897a47a7c3cc85a8f1b45 | |
parent | 1b81139381469187194d2b616fe8df5cf5770b03 (diff) |
Update post-install commands section
-rw-r--r-- | docs/installing/manual_install.md | 32 |
1 files changed, 23 insertions, 9 deletions
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. +<div class="attention-box"> + Note that we set <code>RAILS_ENV=production</code>. Use + <code>RAILS_ENV=development</code> if you are installing Alaveteli to make + changes to the code. +</div> + ## Run the Server Run the following to get the server running: |