Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #4 from cyberj/master

Some tips for gunicorn
  • Loading branch information...
commit 9cad4a3e9d980915dd752a684abf6cc4012b555a 2 parents 9096aa0 + 9d28de7
@jbl2024 authored
View
5 sample_project/deploy/__init__.py
@@ -0,0 +1,5 @@
+# REALLY UGLY THING
+# =================
+from os.path import abspath, dirname, join
+deploy = join(abspath(dirname(__file__)), 'deploy.wsgi')
+execfile(deploy)
View
13 sample_project/deploy/runit.example.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+GUNICORN=../vtenv/bin/gunicorn
+PID=/var/run/django_sample_env.pid
+USER=user
+APP=deploy
+DIR=/path/to/application
+
+if [ -f $PID ]; then rm $PID; fi
+
+cd $DIR
+exec sudo -H -u $USER DJANGO_MODE="development" $GUNICORN $APP
+#exec sudo -H -u cyberj $GUNICORN --pid=$PID $APP
Please sign in to comment.
Something went wrong with that request. Please try again.