Update entrypoint.sh
This commit is contained in:
+4
-4
@@ -2,10 +2,10 @@
|
||||
# Apply database migrations
|
||||
set -euo pipefail
|
||||
echo "Apply database migrations"
|
||||
poetry run python manage.py migrate
|
||||
python manage.py migrate
|
||||
|
||||
echo "Collect static files"
|
||||
poetry run python manage.py collectstatic --clear --no-input
|
||||
python manage.py collectstatic --clear --no-input
|
||||
|
||||
_term() {
|
||||
echo "Caught SIGTERM signal!"
|
||||
@@ -15,9 +15,9 @@ _term() {
|
||||
trap _term SIGTERM
|
||||
|
||||
echo "Starting Django-Q cluster"
|
||||
poetry run python manage.py qcluster & django_q_pid=$!
|
||||
python manage.py qcluster & django_q_pid=$!
|
||||
|
||||
echo "Starting app"
|
||||
poetry run python -m gunicorn --bind 0.0.0.0:8001 timetracker.asgi:application -k uvicorn.workers.UvicornWorker --access-logfile - --error-logfile - & gunicorn_pid=$!
|
||||
python -m gunicorn --bind 0.0.0.0:8001 timetracker.asgi:application -k uvicorn.workers.UvicornWorker --access-logfile - --error-logfile - & gunicorn_pid=$!
|
||||
|
||||
wait "$gunicorn_pid" "$django_q_pid"
|
||||
|
||||
Reference in New Issue
Block a user