1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2024-12-24 17:42:23 +00:00

Add uwsgi start script

This commit is contained in:
Alexandre Iooss 2019-08-02 13:17:22 +02:00
parent 366b88ad92
commit 90b135f986
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02

19
start_uwsgi.sh Normal file
View File

@ -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