Skip to content

Commit 846a79f

Browse files
committed
fix deploy_prod.sh to restart fast
1 parent 2e7f094 commit 846a79f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

deploy_prod.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ if [ -z "${SHA}" ]; then
1313
echo "SHA 환경변수가 없어서 현재 git SHA로 설정: ${SHA}"
1414
fi
1515

16-
# shutdown exist gunicorn
17-
if [ -f ${PID_FILE} ]; then
18-
PID=$(cat $PID_FILE)
19-
kill -TERM $PID
20-
rm ${PID_FILE}
21-
fi
2216

2317
mkdir -p ${LOG_DIR}
2418

@@ -32,6 +26,14 @@ export DJANGO_SETTINGS_MODULE="pythonkr_backend.settings.prod"
3226
./manage.py tailwind install && ./manage.py tailwind build
3327
./manage.py loaddata fixtures.json
3428
./manage.py collectstatic --clear --noinput
29+
30+
# shutdown exist gunicorn
31+
if [ -f ${PID_FILE} ]; then
32+
PID=$(cat $PID_FILE)
33+
kill -TERM $PID
34+
rm ${PID_FILE}
35+
fi
36+
3537
gunicorn --workers=2 \
3638
-b :2026 \
3739
--access-logfile ${LOG_DIR}/access.log \

0 commit comments

Comments
 (0)