aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo@ubuntu.com>2013-05-28 13:27:35 +0200
committerMilo Casagrande <milo@ubuntu.com>2013-05-28 13:27:35 +0200
commit7a6233168432d6364e7dcb35d17cd2325ba32c62 (patch)
tree343e900108db2fc2747ad1b0922a175fe0c80590
parent52de097bebbc74b4306baf8ea03ad1b08eec31a5 (diff)
downloadrhodecode-config-7a6233168432d6364e7dcb35d17cd2325ba32c62.tar.gz
Fixed upstart conf file: celery now starts correctly.
-rw-r--r--scripts/celeryd.conf14
-rw-r--r--scripts/rhodecode.conf6
2 files changed, 14 insertions, 6 deletions
diff --git a/scripts/celeryd.conf b/scripts/celeryd.conf
index 72fb148..ae4bff1 100644
--- a/scripts/celeryd.conf
+++ b/scripts/celeryd.conf
@@ -9,25 +9,29 @@
description "Celery Upstart Job"
author "Milo Casagrande <milo.casagrande@linaro.org>"
-start on starting rhodecode
-stop on stopping rhodecode
+start on started rhodecode
+stop on stopped rhodecode
respawn
respawn limit 10 5
-umask 0022
+instance $APPINI
+
+umask 0002
env HOME="/home/rhodecode"
env USER="rhodecode"
env GROUP="rhodecode"
-env APPINI="production-0.ini"
+env LOCAL_PY_PATH=".local/lib/python2.7/site-packages/"
limit nofile 4096 65536
script
PIDFILE="/tmp/celeryd-$APPINI.pid"
CONF_FILE="$HOME/$APPINI"
- COMMAND="paster celeryd $CONF_FILE --pidfile=$PIDFILE"
+ COMMAND="paster celeryd $CONF_FILE --pidfile=$PIDFILE --autoscale=8,1"
+ PYTHONPATH="$PYTHONPATH:$HOME/$LOCAL_PY_PATH"
+ export PYTHONPATH=$PYTHONPATH
if [ -z "$GROUP" ]; then
exec sudo -u $USER $COMMAND
else
diff --git a/scripts/rhodecode.conf b/scripts/rhodecode.conf
index 7fef332..948824c 100644
--- a/scripts/rhodecode.conf
+++ b/scripts/rhodecode.conf
@@ -13,12 +13,14 @@ respawn
respawn limit 10 5
instance $APPINI
+export APPINI
-umask 0022
+umask 0002
env HOME="/home/rhodecode"
env USER="rhodecode"
env GROUP="rhodecode"
+env LOCAL_PY_PATH=".local/lib/python2.7/site-packages/"
limit nofile 4096 65536
@@ -26,6 +28,8 @@ script
PIDFILE="/tmp/rhodecode-$APPINI.pid"
LOGFILE="/var/log/rhodecode/rhodecode-$APPINI.log"
CONF_FILE="$HOME/$APPINI"
+ PYTHONPATH="$PYTHONPATH:$HOME/$LOCAL_PY_PATH"
+ export PYTHONPATH=$PYTHONPATH
exec paster serve --user=$USER --group=$GROUP --pid-file=$PIDFILE --log-file=$LOGFILE $CONF_FILE
end script