summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Zapke-Grùˆndemann <markus@keimlink.de>2012-03-29 00:18:43 +0200
committerMarkus Zapke-Grùˆndemann <markus@keimlink.de>2012-03-29 00:18:43 +0200
commit4349652865fa17e392a5af02200ff585114d6d8c (patch)
treef2414f59f89eeda51ef6709d8e21deb02b32fe47
parent8374456683080e045b577a8124e010b12f6638c6 (diff)
configured gunicorn/redis
make gunicorn port configurable. start redis only in development mode.
-rw-r--r--conf/prod_settings.tpl2
-rw-r--r--sublab_project/settings.py2
-rw-r--r--sublab_project/supervisord.conf6
3 files changed, 6 insertions, 4 deletions
diff --git a/conf/prod_settings.tpl b/conf/prod_settings.tpl
index 4a680ba..93df711 100644
--- a/conf/prod_settings.tpl
+++ b/conf/prod_settings.tpl
@@ -2,6 +2,8 @@ import os
from settings import SITE_ROOT
+# GUNICORN_PORT = '8000'
+
AUTH_LDAP_SERVER_URI = 'ldap://oberon.local.sublab.org'
AUTH_LDAP_BIND_PASSWORD = ''
diff --git a/sublab_project/settings.py b/sublab_project/settings.py
index b28a007..a1849c6 100644
--- a/sublab_project/settings.py
+++ b/sublab_project/settings.py
@@ -236,6 +236,8 @@ REDIS_SESSION_CONFIG = {
'COMPRESS_LIB': '',
}
+GUNICORN_PORT = '8000'
+
try:
from local_settings import *
except ImportError:
diff --git a/sublab_project/supervisord.conf b/sublab_project/supervisord.conf
index c940dfd..f212d36 100644
--- a/sublab_project/supervisord.conf
+++ b/sublab_project/supervisord.conf
@@ -1,5 +1,5 @@
[program:gunicorn]
-command={{ PYTHON }} {{ PROJECT_DIR }}/manage.py run_gunicorn
+command={{ PYTHON }} {{ PROJECT_DIR }}/manage.py run_gunicorn --workers=2 --max-requests=1000 --bind=127.0.0.1:{{ settings.GUNICORN_PORT }}
{% if settings.DEBUG %}
exclude=true
{% endif %}
@@ -25,9 +25,7 @@ stopwaitsecs = 600
[program:celerycam]
command={{ PYTHON }} {{ PROJECT_DIR }}/manage.py celerycam
-[program:redis]
{% if settings.DEBUG %}
-command=redis-server
-{% else %}
+[program:redis]
command=redis-server
{% endif %}