From 4a0ed49ab479055c4d5036dbacbf39b69044a381 Mon Sep 17 00:00:00 2001 From: Tao Chen Date: Fri, 21 Jul 2023 14:00:36 -0700 Subject: [PATCH] Copilot Chat: Disable alwaysOn and enable health check (#2084) ### Motivation and Context Addressing item https://github.com/microsoft/semantic-kernel/issues/1702. ### Description Instead of mapping / to /healthz, we decided to disable alwaysOn and enable App Service health check. This is because mapping / to /healthz creates a dependency on the deployment setup and makes the code harder to maintain, i.e when alwaysOn is disabled, there is really not point at mapping the route. Thus, disabling alwaysOn and enabling App service health check is a cleaner solution. ### Contribution Checklist - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: --- samples/apps/copilot-chat-app/deploy/main.bicep | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/apps/copilot-chat-app/deploy/main.bicep b/samples/apps/copilot-chat-app/deploy/main.bicep index 7307dea84fc1..f60caeaff552 100644 --- a/samples/apps/copilot-chat-app/deploy/main.bicep +++ b/samples/apps/copilot-chat-app/deploy/main.bicep @@ -134,6 +134,9 @@ resource appServiceWeb 'Microsoft.Web/sites@2022-09-01' = { serverFarmId: appServicePlan.id httpsOnly: true virtualNetworkSubnetId: virtualNetwork.properties.subnets[0].id + siteConfig: { + healthCheckPath: '/healthz' + } } } @@ -141,7 +144,7 @@ resource appServiceWebConfig 'Microsoft.Web/sites/config@2022-09-01' = { parent: appServiceWeb name: 'web' properties: { - alwaysOn: true + alwaysOn: false cors: { allowedOrigins: [ 'http://localhost:3000'