Gunicorn reloads static content on recent versions (before December 27, 2023).
There was an issue about reload-extra-file
that Gunicorn maintainers solved recently (December 27, 2023).
One question was made on Github and was about json files: Opened issue.
The --reload-extra-file parameter intent to reload extra files when they are changed, besides Python files (as made by --reload = True
). One of the team decided to open a pull request to solve the problem: Opened pull.
Thus, since recent versions, maybe after the 20.1.x, there is the option below (my case example on a gunicorn.config.py):
reload_extra_file = ['static/css/*.css', 'static/js/*.js', 'templates/*.html']
There is another detail that cause some problems to me. The documentation has a reference to reload-extra-files
(on plural). But the right parameter is on singular: reload-extra-file
as on documentation example, just below the reference.
It's worth to note that workers can cause some confusion as consequence from delays.
updated March, 28th 2023
I'm giving up to use gunicorn for development environment. After reading this, my environment wasn't working as expected yet.