Changed starting commands for running server

* Performance is very low
This commit is contained in:
Andrew-Chen-Wang 2020-03-24 20:51:43 -04:00
parent 910ed86d11
commit 125ffec243
3 changed files with 2 additions and 3 deletions

View File

@ -7,7 +7,7 @@ set -o nounset
python manage.py migrate
{%- if cookiecutter.use_async %}
/usr/local/bin/uvicorn config.asgi --bind 0.0.0.0:5000 --chdir=/app
/usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:8000 --chdir=/app -k uvicorn.workers.UvicornWorker -e DJANGO_SETTINGS_MODULE=config.settings.local --reload
{%- else %}
python manage.py runserver_plus 0.0.0.0:8000
{% endif %}

View File

@ -28,7 +28,7 @@ if compress_enabled; then
fi
{%- endif %}
{% if cookiecutter.use_async %}
/usr/local/bin/uvicorn config.asgi --bind 0.0.0.0:5000 --chdir=/app
/usr/local/bin/gunicorn config.asgi --workers 4 --bind 0.0.0.0:5000 --chdir=/app -k uvicorn.workers.UvicornWorker
{% else %}
/usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app
{%- endif %}

View File

@ -11,7 +11,6 @@ import sys
from pathlib import Path
from django.core.asgi import get_asgi_application
from .websocket import websocket_application
# This allows easy placement of apps within the interior