From 28d79ea08999735d8d1cf8ef928eb9c07c0a9853 Mon Sep 17 00:00:00 2001 From: Samuel Lai Date: Thu, 27 Feb 2014 21:58:22 +1100 Subject: [PATCH] Added notes on using supervisor with stackdump. --- README.textile | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/README.textile b/README.textile index 9157a70..993a0d8 100644 --- a/README.textile +++ b/README.textile @@ -140,8 +140,6 @@ To start Stackdump, execute the following command - If you need to change the port that it runs on, or modify other settings that control how Stackdump works; see the 'Optional configuration' section below for more details. -Stackdump comes bundled with some init.d scripts as well which were tested on CentOS 5. These are located in the @init.d@ directory. To use these, you will need to modify them to specify the path to the Stackdump root directory and the user to run under. - Both the search indexer and the app need to be running for Stackdump to work. h2. Optional configuration @@ -157,6 +155,25 @@ The settings file is located in @stackdump_dir/python/src/stackdump/settings.py@ * *NUM_OF_RANDOM_QUESTIONS* - the number of random questions shown on the home page of Stackdump and the site pages. The default is _3_ questions. * *REWRITE_LINKS_AND_IMAGES* - by default, all links are rewritten to either point internally or be marked as an external link, and image URLs are rewritten to point to a placeholder image. Set this setting to _False_ to disable this behaviour. +h2. Running Stackdump as a service + +Stackdump comes bundled with some init.d scripts as well which were tested on CentOS 5. These are located in the @init.d@ directory. To use these, you will need to modify them to specify the path to the Stackdump root directory and the user to run under. + +Another option is to use "Supervisor":http://supervisord.org/ with a simple configuration file, e.g., + +bc. [program:stackdump-solr] +command=/path/to/stackdump/start_solr.sh +priority=900 +user= +stdout_logfile=/path/to/stackdump/solr_stdout.log +stderr_logfile=/path/to/stackdump/solr_stderr.log + +[program:stackdump-web] +command=/path/to/stackdump/start_web.sh +user= +stdout_logfile=/path/to/stackdump/web_stdout.log +stderr_logfile=/path/to/stackdump/web_stderr.log + h2. Maintenance Stackdump stores all its data in the @data@ directory under its root directory. If you want to start fresh, just stop the app and the search indexer, delete that directory and restart the app and search indexer.