aboutsummaryrefslogtreecommitdiffstats
path: root/docs/installing
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-08-07 16:56:28 +0100
committerGareth Rees <gareth@mysociety.org>2014-08-21 17:38:19 +0100
commite7b7bb92a174ffa51092978db2b187ab7876ff7f (patch)
treefcdb51cb5a9beb804d1987085cd5a4c8c1b88cd7 /docs/installing
parent6a1eef1af33b6f4cb0c9df7e1546538767849dc0 (diff)
Add documentation on generating app daemon
Diffstat (limited to 'docs/installing')
-rw-r--r--docs/installing/manual_install.md65
1 files changed, 65 insertions, 0 deletions
diff --git a/docs/installing/manual_install.md b/docs/installing/manual_install.md
index ad9c88966..2d3a3aff2 100644
--- a/docs/installing/manual_install.md
+++ b/docs/installing/manual_install.md
@@ -447,6 +447,71 @@ useful to you. Change the variables to suit your installation.
chown root:alaveteli /etc/cron.d/alaveteli
chmod 754 /etc/cron.d/alaveteli
+### Generate application daemon
+
+Generate a daemon based on the application server you installed. This allows you
+to use the native `service` command to stop, start and restart the application.
+
+#### Passenger
+
+**Template Variables:**
+
+* `vhost_dir`: the full path to the directory where alaveteli is checked out.
+ e.g. If your checkout is at `/var/www/alaveteli` then set this to `/var/www`
+* `vcspath`: the name of the directory that contains the alaveteli code.
+ e.g. `alaveteli`
+* `site`: a string to identify your alaveteli instance
+* `user`: the user that the software runs as
+
+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 \
+ DEPLOY_USER=alaveteli \
+ VHOST_DIR=/var/www \
+ VCSPATH=alaveteli \
+ SITE=alaveteli \
+ SCRIPT_FILE=/var/www/alaveteli/config/sysvinit-passenger.ugly > /etc/init.d/alaveteli
+ popd
+
+ chown root:alaveteli /etc/init.d/alaveteli
+ chmod 754 /etc/init.d/alaveteli
+
+Start the application:
+
+ service alaveteli start
+
+#### Thin
+
+**Template Variables:**
+
+* `vhost_dir`: the full path to the directory where alaveteli is checked out.
+ e.g. If your checkout is at `/var/www/alaveteli` then set this to `/var/www`
+* `vcspath`: the name of the directory that contains the alaveteli code.
+ e.g. `alaveteli`
+* `site`: a string to identify your alaveteli instance
+* `user`: the user that the software runs as
+
+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 \
+ DEPLOY_USER=alaveteli \
+ VHOST_DIR=/var/www \
+ VCSPATH=alaveteli \
+ SITE=alaveteli \
+ SCRIPT_FILE=/var/www/alaveteli/config/sysvinit-thin.ugly > /etc/init.d/alaveteli
+ popd
+
+ chown root:alaveteli /etc/init.d/alaveteli
+ chmod 754 /etc/init.d/alaveteli
+
+Start the application:
+
+ service alaveteli start
+
### Generate alert daemon
One of the cron jobs refers to a script at `/etc/init.d/foi-alert-tracks`. This