django-template/django-launcher.sh
jnfire e51406e31a add env and clean old apps
add env and clean old apps
2022-07-29 10:59:09 +02:00

18 lines
425 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
python3 manage.py runserver 0.0.0.0:8000
#echo "*****Start server with production mode*****"
#daphne -b 0.0.0.0 -p 8000 core.asgi:application