mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-01-19 01:23:02 +08:00
16 lines
452 B
Bash
16 lines
452 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
cd docmanager_backend/
|
||
|
python manage.py graph_models -o ../documentation/erd/app_models.png
|
||
|
python manage.py spectacular --color --file schema.yml
|
||
|
python manage.py migrate
|
||
|
if [ ! -d "static" ]; then
|
||
|
echo "Generating static files"
|
||
|
python manage.py collectstatic --noinput
|
||
|
fi
|
||
|
if [ "$DEBUG" = 'True' ]; then
|
||
|
python manage.py runserver "0.0.0.0:8000"
|
||
|
else
|
||
|
gunicorn --workers 8 --bind 0.0.0.0:8000 config.wsgi:application
|
||
|
fi
|