From 9c5e30bdefe40f270f8285e75aa1445de1e7bf2c Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Tue, 19 Aug 2014 15:25:50 +0100 Subject: Set environment for init scripts. Also, add note about setting staging_site. If you don't do this, init scripts don't run in production unless you set the RAILS_ENV in them explicitly. With staging_site set, rails-post-deploy creates config/rails_env.rb to force the production environment. --- docs/installing/manual_install.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'docs/installing/manual_install.md') diff --git a/docs/installing/manual_install.md b/docs/installing/manual_install.md index 51b5fb56b..98e1a4d10 100644 --- a/docs/installing/manual_install.md +++ b/docs/installing/manual_install.md @@ -357,6 +357,10 @@ As the user needs the ability to turn off constraints whilst running the tests t We have a full [guide to Alaveteli configuration]({{ site.baseurl }}docs/customising/config/) which covers all the settings in `config/general.yml`. +_Note:_ If you are setting up Alaveteli to run in production, set the [`STAGING_SITE`]({{ site.baseurl }}docs/customising/config/#staging_site) variable to `0` in `/var/www/alaveteli/config/general.yml` now. + + STAGING_SITE: 0 + The default settings for frontpage examples are designed to work with the dummy data shipped with Alaveteli; once you have real data, you should certainly edit these. @@ -567,7 +571,7 @@ There is a rake task that will help to rewrite this file into one that is useful to you. Change the variables to suit your installation. pushd /var/www/alaveteli - bundle exec rake config_files:convert_init_script \ + bundle exec rake RAILS_ENV=production config_files:convert_init_script \ DEPLOY_USER=alaveteli \ VHOST_DIR=/var/www \ VCSPATH=alaveteli \ @@ -601,7 +605,7 @@ There is a rake task that will help to rewrite this file into one that is useful to you. Change the variables to suit your installation. pushd /var/www/alaveteli - bundle exec rake config_files:convert_init_script \ + bundle exec rake RAILS_ENV=production config_files:convert_init_script \ DEPLOY_USER=alaveteli \ VHOST_DIR=/var/www \ VCSPATH=alaveteli \ -- cgit v1.2.3