mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-06-28 16:35:46 +08:00
Containerize backend api and add erd generator via django-extensions
This commit is contained in:
parent
cf981c3c08
commit
9b78fdd9ae
7 changed files with 72 additions and 1 deletions
15
scripts/start.sh
Normal file
15
scripts/start.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/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
|
Loading…
Add table
Add a link
Reference in a new issue