From ec632246c1b1bba830c5efa2efbcfcf88ca1fe70 Mon Sep 17 00:00:00 2001 From: Josue Kouka Date: Mon, 5 Sep 2016 16:22:30 +0200 Subject: [PATCH] add deployment with uwsgi (#13060) --- debian/control | 2 +- debian/fargo.init | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/debian/control b/debian/control index ce12764..373c976 100644 --- a/debian/control +++ b/debian/control @@ -22,6 +22,6 @@ Depends: ${misc:Depends}, python-django-tenant-schemas, python-psycopg2, python-django-mellon, - gunicorn + uwsgi Recommends: nginx, postgresql Description: Fargo Document Box diff --git a/debian/fargo.init b/debian/fargo.init index 5ebf6ea..75abb9a 100644 --- a/debian/fargo.init +++ b/debian/fargo.init @@ -16,7 +16,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Document Box" NAME=fargo -DAEMON=/usr/bin/gunicorn +DAEMON=/usr/bin/uwsgi RUN_DIR=/run/$NAME PIDFILE=$RUN_DIR/$NAME.pid LOG_DIR=/var/log/$NAME @@ -37,17 +37,17 @@ GROUP=$NAME # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME -DAEMON_ARGS=${DAEMON_ARGS:-"--pid $PIDFILE \ ---user $USER --group $GROUP \ ---daemon \ ---access-logfile $LOG_DIR/gunicorn-access.log \ ---log-file $LOG_DIR/gunicorn-error.log \ ---bind=$BIND \ ---workers=$WORKERS \ ---worker-class=sync \ ---timeout=$TIMEOUT \ ---name $NAME \ -$NAME.wsgi:application"} +DAEMON_ARGS=${DAEMON_ARGS:-"--pidfile $PIDFILE \ +--uid $USER --gid $GROUP \ +--daemonize $LOG_DIR/uwsgi.log \ +--socket $BIND \ +--processes $WORKERS \ +--harakiri $TIMEOUT \ +--enable-threads \ +--plugin python \ +--vacuum \ +--master \ +--module $NAME.wsgi:application"} # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh -- 2.9.3