Skip to content

Commit

Permalink
chore: ensure that start.sh only runs cluster in background and serve…
Browse files Browse the repository at this point in the history
…r in foreground (#123)

This would effectively prevent the container from shutting down prematurely when it has nothing is in the foreground
  • Loading branch information
wax911 authored Apr 28, 2024
1 parent c9f1cdd commit 789a67b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@ python manage.py makemigrations migrate
echo 'Collecting static files...'
python manage.py collectstatic --no-input

echo "Starting server"
echo "Starting qcluster"
python manage.py qcluster &

echo "Starting server"
if [ "$1" = "--debug" ]; then
python manage.py runserver 0.0.0.0:8800 &
python manage.py runserver 0.0.0.0:8800
else
gunicorn "$APP_NAME.wsgi:application" \
--bind "0.0.0.0:$GUNICORN_PORT" \
--workers "$GUNICORN_WORKERS" \
--timeout "$GUNICORN_TIMEOUT" \
--log-level "$GUNICORN_LOG_LEVEL" &
fi


echo "Starting qcluster"
python manage.py qcluster &
--log-level "$GUNICORN_LOG_LEVEL"
fi

0 comments on commit 789a67b

Please sign in to comment.