django-template/django-launcher.pro.sh
2021-04-29 09:35:19 +02:00

20 lines
420 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
# Apply crons
service cron start
python3 manage.py crontab remove
python3 manage.py crontab add
# Start server
echo "Starting server"
uvicorn --host 0.0.0.0 --port 8000 chapps.asgi:application