Skip to content

Commit e455028

Browse files
committed
fix deploy_prod.sh
1 parent 5d7e7de commit e455028

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

deploy_prod.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ source .venv/bin/activate
2525
uv sync
2626
cd pythonkr_backend
2727
export DJANGO_SETTINGS_MODULE="pythonkr_backend.settings.prod"
28+
2829
./manage.py migrate --no-input
2930
./manage.py tailwind install && ./manage.py tailwind build
3031
./manage.py loaddata fixtures.json
@@ -35,6 +36,12 @@ if [ -f ${PID_FILE} ]; then
3536
PID=$(cat $PID_FILE)
3637
kill -TERM $PID
3738
rm ${PID_FILE}
39+
echo "Waiting for gunicorn processes to exit (max 10 seconds)..."
40+
timeout=0
41+
while pgrep -u pk gunicorn > /dev/null && [ $timeout -lt 10 ]; do
42+
sleep 1
43+
timeout=$((timeout+1))
44+
done
3845
fi
3946

4047
gunicorn --workers=2 \

0 commit comments

Comments
 (0)