11#! /bin/bash
22
33echo " Applying database migrations"
4- python manage.py migrate --noinput
4+ uv run python manage.py migrate --noinput
55
66echo " Collecting static files"
7- python manage.py collectstatic --noinput
7+ uv run python manage.py collectstatic --noinput
88
99# Create Django Superuser
1010echo " Creating Django Superuser"
11- python manage.py createsuperuser --noinput
11+ uv run python manage.py createsuperuser --noinput
1212
1313# Run inbuilt Django server if ENV is development
1414if [ " ${APP_ENV^^} " = " DEVELOPMENT" ]; then
1515
1616 # Install extra non-prod packages
1717 printf " \n" && echo " Installing dev dependencies for $APP_ENV "
18- uv sync
18+ uv sync --frozen --all-groups
1919 # Run developments
2020 printf " \n" && echo " Starting inbuilt django webserver"
2121 echo " Running: python manage.py runserver 0.0.0.0:8081"
22- python manage.py runserver 0.0.0.0:8081
22+ uv run python manage.py runserver 0.0.0.0:8081
2323 exit
2424fi
2525
@@ -31,5 +31,5 @@ if [ "${APP_ENV^^}" = "PRODUCTION" ]; then
3131 # Run Gunicorn / Django
3232 printf " \n" && echo " Running Gunicorn / Django"
3333 echo " Running: gunicorn api.wsgi -b 0.0.0.0:8081 --workers=6 --keep-alive 20 --log-file=- --log-level debug --access-logfile=/var/log/accesslogs/gunicorn --capture-output --timeout 50"
34- gunicorn api.wsgi -b 0.0.0.0:8081 --workers=6 --keep-alive 20 --log-file=- --log-level debug --access-logfile=/var/log/accesslogs/gunicorn --capture-output --timeout 50
35- fi
34+ uv run gunicorn api.wsgi -b 0.0.0.0:8081 --workers=6 --keep-alive 20 --log-file=- --log-level debug --access-logfile=/var/log/accesslogs/gunicorn --capture-output --timeout 50
35+ fi
0 commit comments