10

A quick guide to publish Python SDK Azure Bots in App Service - Microsoft Commun...

 1 year ago
source link: https://techcommunity.microsoft.com/t5/iis-support-blog/a-quick-guide-to-publish-python-sdk-azure-bots-in-app-service/ba-p/3659026
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

A quick guide to publish Python SDK Azure Bots in App Service

A quick guide to publish Python SDK Azure Bots in App Service
Published Oct 22 2022 09:36 PM 758 Views

This article assumes that you already have created and published Python Bot using the link below:

Provision and publish a bot in Azure - Bot Service | Microsoft Learn

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'.

Probable causes:

App Service configured as Messaging Endpoint could have been missing one or more of the following configurations:

  1. App Service --> Configuration --> Application Settings:
    1. MicrosoftAppId (Application Id of the App Registration)
    2. MicrosoftAppPassword (Secret of the App Registration if not ManagedIdentity type)
    3. SCM_DO_BUILD_DURING_DEPLOYMENT: true (build during deployment to true)
      thumbnail image 1 of blog post titled                                              A quick guide to publish Python SDK Azure Bots in App Service
  2. 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​>
    thumbnail image 2 of blog post titled                                              A quick guide to publish Python SDK Azure Bots in App Service
    Note : <APP> should be application's root file. By default it is APP is root file name. 

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. 


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK