From 90b135f98617cbb3205ff60d90ba102e7c977484 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Fri, 2 Aug 2019 13:17:22 +0200 Subject: [PATCH] Add uwsgi start script --- start_uwsgi.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 start_uwsgi.sh diff --git a/start_uwsgi.sh b/start_uwsgi.sh new file mode 100644 index 0000000..fa88edd --- /dev/null +++ b/start_uwsgi.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# This will launch the Django project as a UWSGI socket +# then Apache or NGINX will be able to use that socket + +PROJECT_PATH="$(pwd)" + +# Official Django configuration +uwsgi_python3 --chdir=$PROJECT_PATH \ + --module=med.wsgi:application \ + --env DJANGO_SETTINGS_MODULE=med.settings \ + --master --pidfile=$PROJECT_PATH/uwsgi.pid \ + --socket=$PROJECT_PATH/uwsgi.sock \ + --processes=5 \ + --chmod-socket=600 \ + --harakiri=20 \ + --max-requests=5000 \ + --vacuum \ + --daemonize=$PROJECT_PATH/uwsgi.log \ + --protocol=fastcgi