Skip to content

Commit ece1b81

Browse files
committed
chore: ensure that start.sh only runs cluster in background and server in foreground
This would effectively prevent the container from shutting down prematurely when it has nothing is in the foreground
1 parent c9f1cdd commit ece1b81

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

start.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@ python manage.py makemigrations migrate
66
echo 'Collecting static files...'
77
python manage.py collectstatic --no-input
88

9-
echo "Starting server"
9+
echo "Starting qcluster"
10+
python manage.py qcluster &
1011

12+
echo "Starting server"
1113
if [ "$1" = "--debug" ]; then
12-
python manage.py runserver 0.0.0.0:8800 &
14+
python manage.py runserver 0.0.0.0:8800
1315
else
1416
gunicorn "$APP_NAME.wsgi:application" \
1517
--bind "0.0.0.0:$GUNICORN_PORT" \
1618
--workers "$GUNICORN_WORKERS" \
1719
--timeout "$GUNICORN_TIMEOUT" \
18-
--log-level "$GUNICORN_LOG_LEVEL" &
19-
fi
20-
21-
22-
echo "Starting qcluster"
23-
python manage.py qcluster &
20+
--log-level "$GUNICORN_LOG_LEVEL"
21+
fi

0 commit comments

Comments
 (0)