aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-09-05 21:23:46 +0100
committerGareth Rees <gareth@mysociety.org>2014-09-05 21:23:46 +0100
commitf1a2b5e46f59205877c3b2013f76b1072e0fe201 (patch)
tree112cd97422d2bc0e50d9951c4ebde60d23896165
parent72754b319b154ae175458750dafa597f8115d3b0 (diff)
parent2b77e4521787d1024e8e4c710b277e435a3ecd77 (diff)
Merge branch 'hotfix/0.19.0.2'0.19.0.2
-rwxr-xr-xconfig/sysvinit-thin.ugly3
-rw-r--r--lib/tasks/config_files.rake3
2 files changed, 4 insertions, 2 deletions
diff --git a/config/sysvinit-thin.ugly b/config/sysvinit-thin.ugly
index cc604d994..b333f3738 100755
--- a/config/sysvinit-thin.ugly
+++ b/config/sysvinit-thin.ugly
@@ -17,6 +17,7 @@ NAME=!!(*= $site *)!!
SITE_HOME=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!
DESC="Alaveteli app server"
USER=!!(*= $user *)!!
+RAILS_ENV=!!(*= $rails_env *)!!
set -e
@@ -26,7 +27,7 @@ su -l -c "cd $SITE_HOME && bundle exec thin --version &> /dev/null || exit 0" $U
start_daemon() {
echo -n "Starting $DESC: "
cd "$SITE_HOME" && bundle exec thin \
- --environment=production \
+ --environment=$RAILS_ENV \
--user="$USER" \
--group="$USER" \
--address=127.0.0.1 \
diff --git a/lib/tasks/config_files.rake b/lib/tasks/config_files.rake
index 5dda64a04..1528d7324 100644
--- a/lib/tasks/config_files.rake
+++ b/lib/tasks/config_files.rake
@@ -32,7 +32,8 @@ namespace :config_files do
:user => ENV['DEPLOY_USER'],
:vhost_dir => ENV['VHOST_DIR'],
:vcspath => ENV.fetch('VCSPATH') { 'alaveteli' },
- :site => ENV.fetch('SITE') { 'foi' }
+ :site => ENV.fetch('SITE') { 'foi' },
+ :rails_env => ENV.fetch('RAILS_ENV') { 'development' }
}
# Use the filename for the $daemon_name ugly variable