Move to uv/pyproject and overhaul project structure

This commit is contained in:
Keannu Christian Bernasol 2025-09-01 02:10:28 +08:00
commit fbb76f8196
26 changed files with 1981 additions and 0 deletions

27
.docker/start.sh Normal file
View file

@ -0,0 +1,27 @@
#!/bin/bash
# Startup script for Docker container
echo "Running as: $RUN_TYPE"
cd /app/src/
if [ "$RUN_TYPE" = "api" ]; then
echo "Generating OpenAPI schema file"
python manage.py spectacular --color --file schema.yml
echo "Applying database migrations"
python manage.py migrate
if [ ! -d "static" ]; then
echo "Generating static files"
python manage.py collectstatic --noinput
fi
if [ "$BACKEND_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
# TODO: Add in other runtypes (i.e. Celery Worker, Beat, Flower, etc)
else
echo "No RUN_TYPE value set. Exiting"
exit 1
fi