Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to wait for "az webapp restart" to be completed?

Tags:

docker

azure

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.

like image 490
Johan Mattsson Avatar asked Nov 04 '25 08:11

Johan Mattsson


1 Answers

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.

like image 199
Andriy Bilous Avatar answered Nov 07 '25 11:11

Andriy Bilous



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!