[Django] Django auto reload (with. gunicorn '--reload' option)

Posted by qwlake on December 10, 2020

When you work on django in docker, sometimes it’s not might be autoload. I have been shutdown and restart the docker-compose process, but, there is cool way.

  1. Mount code volumes into django image (https://stackoverflow.com/a/32029035)
  2. Set --reload option on the command line executor of gunicorn
1
gunicorn myapp.dev.wsgi -b 0:8080 --reload