title: Restart Nginx or reload certificate cache on cert change
body: <p><strong>Background:</strong></p>
  
  <p>I am running an app inside Docker, that will be managed by random users that do often not have any knowledge about Docker itself. I am building the app to be as much configurable from the webserver itself as possible. </p>
  
  <p>It runs 3 non-root containers:</p>
  
  <ul>
  <li>Container 1: Gunicorn,Django,Certbot</li>
  <li>Container 2: Nginx</li>
  <li>Container 3: Postgresql</li>
  </ul>
  
  <p>I am able to let the Django app run certbot via the website itself to get a certificate and copy the certificate into the volume that nginx is using. But the old or self-signed certificate seems to be cached by nginx on startup and so the new certificate is not used until a restart of nginx. </p>
  
  <p>And here is the problem, I must now restart nginx or somehow reload the certificates automatically. Either by triggering the restart from the Django container to the Nginx Container maybe via a curl or something. Or I can use something like watchdog to watch the files for a file change. </p>
  
  <p><strong>Question:</strong></p>
  
  <p>What is the best approach to reload nginx automatically if a certificate changes? Or can I purge the certificate cache of the certificates even without restarting the server? What is your suggestion here?</p>
  
  <p>Thanks for your help in advance!</p>