Skip to content

Commit

Permalink
feat: improved start script migrations verbosity for better clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
nimish-ks committed Jan 4, 2025
1 parent 220342d commit ea9e433
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions backend/scripts/start.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/sh
set -e

# If set to true the Django database migrations needs be run externally
if [ "$EXTERNAL_MIGRATION" != "true" ]; then
echo "Running migrations..."
echo "Checking migration configuration..."
if [ "$EXTERNAL_MIGRATION" = "true" ]; then
echo "EXTERNAL_MIGRATION flag is set to true. Skipping migrations as they will be handled externally."
else
echo "EXTERNAL_MIGRATION flag is not set. Running migrations locally..."
python manage.py migrate
fi

echo "Starting gunicorn..."
echo "Starting gunicorn server..."
exec gunicorn -b '[::]:8000' --workers 3 backend.wsgi:application

0 comments on commit ea9e433

Please sign in to comment.