2023-05-10 09:02:59 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Run migrations, collect static files and start server
|
|
|
|
if [ "$APP_ENV" != "prod" ]; then
|
|
|
|
python manage.py makemigrations --noinput
|
|
|
|
python manage.py migrate --noinput
|
2023-05-10 13:19:19 +02:00
|
|
|
python manage.py runserver "$APP_HOST":"$APP_PORT"
|
2023-05-10 09:02:59 +02:00
|
|
|
else
|
|
|
|
python manage.py makemigrations --noinput
|
|
|
|
python manage.py migrate --noinput
|
|
|
|
python manage.py collectstatic --noinput
|
2023-05-10 14:02:09 +02:00
|
|
|
gunicorn "$APP_NAME".wsgi:application --bind "$APP_HOST":"$APP_PORT" --workers 3 --log-level=info
|
2023-05-10 09:02:59 +02:00
|
|
|
fi
|