App Deployment
Let's now deploy Chatbot FrontEnd and BackEnd to Azure App Service.
In order to deploy the Chatbot to Azure, you need to have 2 App Services. Go back to Azure Deployment step and follow Option 2: Deploy App Service Only to create resources if you skip the step earlier.
Deploy Chatbot BackEnd API to Azure App Service
- 
Open repo in VS code.
 - 
Install
Azure App Serviceextension in Vs Code. If you are using GitHub Codespaces, extension is already installed.
 - 
Sign in to Azure in the Azure tab

 - 
Expand
App Servicesnode in yourSubscription
 - 
Right click
App Servicename and select 'Deploy to Web App..`
 - 
Select Browse in the dropdownlist and locate
apps\apifolder and click ok.
 - 
Select
Deployif below popup shows. Check the progress in VS Code'sAzuretab
 - 
Once completed, you can find api app url in your Azure Portal under the
App Service
infoThe VS Code deployment only uploads code to
App Service, there will be additional build activity running in the server side. Check progress inDeployment Center.
 - 
Open the Url in browser and add path
\docsto access the swagger. for example: https://arg-syd-aiapp1day-api.azurewebsites.net/docs 
Deploy Chatbot FrontEnd to Azure App Service
- 
Update frontend chatbot's
BACKEND_URIinapps\chatbot\.envfile. Replace theBACKEND_URIwith the actual Azure App service url of backend from last step, similar to below.BACKEND_URI=https://arg-syd-aiapp1day-api.azurewebsites.net - 
Repeat above steps and deploy
apps\chatbotfolder - 
Once completed, you can find chatbot app url in your Azure Portal under the
App Service. for example, https://arg-syd-aiapp1day-chat.azurewebsites.net/ - 
Open the chatbot url in your browser and try out the prompts.
infoIf you see an error in the chatbot, switch to
developer toolsin the browser. Check if you have the backend API url configured correctly. - 
Now, you have deployed your chatbot to Azure! Congrat !!
infoForget to mention, there would also be a CORS error. Please try and find the commented line that configures CORS in the API. :p
 - 
Now, you have successfully deployed your chatbot to Azure! Congrat !!