Skip to content

Commit

Permalink
Graceful gunicorn reload
Browse files Browse the repository at this point in the history
  • Loading branch information
txels committed Apr 13, 2024
1 parent 46a3c73 commit dda03f1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,21 @@ k8s-restart:
kubectl rollout restart deploy/${IMAGE}

serve:
gunicorn \
exec gunicorn \
--bind 0.0.0.0:8000 \
--workers 2 shipanaro.mediawsgi \
--capture-output --log-file="-" \
--access-logfile="-" | tee -a tripulacio.log

reload-gunicorn:
kill -HUP `pgrep gunicorn | head -n 1`

update:
git pull || echo "Cannot pull"
pipenv install
pipenv run ./manage.py compilemessages
pipenv run ./manage.py migrate
pipenv run ./manage.py collectstatic --noinput
make reload-gunicorn

.PHONY: init-data clean-data lint run stop test ldap-test

0 comments on commit dda03f1

Please sign in to comment.