mirror of
https://github.com/workhardbekind/workout-challenge.git
synced 2026-07-04 09:23:32 -04:00
20 lines
No EOL
447 B
Bash
20 lines
No EOL
447 B
Bash
#!/bin/bash
|
|
|
|
# Working dir is "src-backend"
|
|
|
|
export DJANGO_SETTINGS_MODULE="workout_challenge.settings"
|
|
|
|
echo "Run make migrations"
|
|
python manage.py makemigrations
|
|
|
|
echo "Run migrate"
|
|
python manage.py migrate
|
|
|
|
if [ $DEBUG == "true" ] || [ $DEBUG == "True" ]; then
|
|
echo "Run Django Server";
|
|
python ./manage.py runserver 0.0.0.0:8000;
|
|
else
|
|
echo "Run Gunicorn Server";
|
|
python manage.py collectstatic --noinput;
|
|
gunicorn -c ./gunicorn.conf.py;
|
|
fi |