This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.
This article assumes that you already have created and published Python Bot using the link below:
But you might end up facing some issues like below:
- Container pythonbot_### didn't respond to HTTP pings on port: 8000, failing site start
- Container pythonbot_### for site pythonbot has exited, failing site start
- Failed to find attribute 'app' in 'app'.
App Service configured as Messaging Endpoint could have been missing one or more of the following configurations:
- App Service --> Configuration --> Application Settings:
- MicrosoftAppId (Application Id of the App Registration)
- MicrosoftAppPassword (Secret of the App Registration if not ManagedIdentity type)
- SCM_DO_BUILD_DURING_DEPLOYMENT: true (build during deployment to true)
- App Service --> Configuration --> General Settings: You need to provide a startup command that will be run as part of container startup, you can use the following :
gunicorn --bind 0.0.0.0 --worker-class aiohttp.worker.GunicornWebWorker --timeout 600 app:<APP>
The following article talks in detail about startup command for Python in Azure App Service :
Configure Linux Python apps - Azure App Service | Microsoft Learn
I hope this helps.