If Nginx starts before the prod Django container is up and listening for requests, Nginx will fail all requests redirected to the (not yet available) upstream.
This fix checks that nantral-platform.fr is accessible every 30s and restarts the Nginx container if needed.
Most importantly, this will allow us to reboot our VPS without having to manually restart Nginx (this caused the website to be down on the 11th of May 2023
If Nginx starts before the prod Django container is up and listening for requests, Nginx will fail all requests redirected to the (not yet available) upstream.
This fix checks that nantral-platform.fr is accessible every 30s and restarts the Nginx container if needed.
Most importantly, this will allow us to reboot our VPS without having to manually restart Nginx (this caused the website to be down on the 11th of May 2023