How do I know when my docker application in Azure has been restarted after running az webapp restart?
I would like to wait at the end of the upload script until the system is ready.
When you run command az webapp restart this is just an API call to Azure, then Azure will restart your Docker container and send you 200 OK response.
az webapp restart will not wait when your Docker container is ready to serve requests.
To consider a container to be successfully started, the container must start and it must respond to an HTTP ping.
https://techcommunity.microsoft.com/t5/apps-on-azure/things-you-should-know-web-apps-and-linux/ba-p/392472
I would recommend you to make a constant HTTP request(maybe in cycle every 1 second) to your application and if you receive 200 OK response, you can run upload script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With