2021-04-01 09:48:35 +02:00
|
|
|
#!/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"
|
2021-10-21 15:02:00 +02:00
|
|
|
## With WebSockets
|
2021-04-01 09:48:35 +02:00
|
|
|
uvicorn --host 0.0.0.0 --port 8000 --reload chapps.asgi:application
|
2021-10-21 15:02:00 +02:00
|
|
|
## without WebSockets
|
|
|
|
#gunicorn --workers=4 -b 0.0.0.0:8000 --reload gotrucki.wsgi:application
|