cookiecutter-django/{{cookiecutter.project_slug}}/compose/local/django/start
Andrew-Chen-Wang aee2de347b Add uvicorn and web sockets for Django 3
* Add use_async option to cookiecutter.json
* Add websocket configuration
2020-03-24 15:40:14 -04:00

14 lines
256 B
Bash

#!/bin/bash
set -o errexit
set -o pipefail
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
{%- else %}
python manage.py runserver_plus 0.0.0.0:8000
{% endif %}