django-template/django-launcher.sh
Andros Fenollosa 400d0f1b9c Add template
2022-06-27 14:28:40 +02:00

18 lines
446 B
Bash

#!/bin/sh
# Collect static files
echo "Collect static files"
python3 manage.py collectstatic --noinput
# Apply database migrations
echo "Apply database migrations"
python3 manage.py makemigrations
python3 manage.py migrate
# Start server
echo "Starting server"
## With WebSockets
uvicorn --host 0.0.0.0 --port 8000 --reload ccstech.asgi:application
## without WebSockets
#gunicorn --workers=4 -b 0.0.0.0:8000 --reload ccstech.wsgi:application