1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-07-06 20:54:01 +02:00

Fix entrypoint

This commit is contained in:
Alexandre Iooss
2020-02-09 15:26:34 +01:00
parent 32dbf748a1
commit 3337c70a21
2 changed files with 20 additions and 4 deletions

View File

@ -11,16 +11,19 @@ sleep 2
python manage.py migrate
python manage.py collectstatic
# harakiri parameter respawns processes taking more than 20 seconds
# max-requests parameter respawns processes after serving 5000 requests
# vacuum parameter cleans up when stopped
uwsgi --chdir="$(pwd)" \
--module=med.wsgi:application \
--env DJANGO_SETTINGS_MODULE=med.settings \
--master \
--pidfile="$(pwd)/uwsgi.pid" \ # create a pidfile
--pidfile="$(pwd)/uwsgi.pid" \
--socket="$(pwd)/uwsgi.sock" \
--processes=5 \
--chmod-socket=600 \
--harakiri=20 \ # respawn processes taking more than 20 seconds
--max-requests=5000 \ # respawn processes after serving 5000 requests
--vacuum \ # clean up when stopped
--harakiri=20 \
--max-requests=5000 \
--vacuum \
--daemonize="$(pwd)/uwsgi.log" \
--protocol=fastcgi