Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reload my gunicorn server automatically?

I want to know, how to restart my gunicorn server automatically. after my django project code has been changed. currently now i am doing manual restart after i made changes , just kill the process and reload it. but it is not a good way. so i want to know how to do the same automatically after code getting changed . i am using nginx too.

like image 551
Mohideen bin Mohammed Avatar asked Nov 06 '25 13:11

Mohideen bin Mohammed


1 Answers

Take a look at the reload setting:

https://docs.gunicorn.org/en/stable/settings.html#debugging

reload

--reload False Restart workers when code changes.

This setting is intended for development. It will cause workers to be restarted whenever application code changes.

like image 173
aris Avatar answered Nov 08 '25 12:11

aris