Skip to content

Commit

Permalink
Copilot Chat: Disable alwaysOn and enable health check (#2084)
Browse files Browse the repository at this point in the history
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
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.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] 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 😄
  • Loading branch information
TaoChenOSU authored Jul 21, 2023
1 parent 3cc4a4d commit 4a0ed49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion samples/apps/copilot-chat-app/deploy/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,17 @@ resource appServiceWeb 'Microsoft.Web/sites@2022-09-01' = {
serverFarmId: appServicePlan.id
httpsOnly: true
virtualNetworkSubnetId: virtualNetwork.properties.subnets[0].id
siteConfig: {
healthCheckPath: '/healthz'
}
}
}

resource appServiceWebConfig 'Microsoft.Web/sites/config@2022-09-01' = {
parent: appServiceWeb
name: 'web'
properties: {
alwaysOn: true
alwaysOn: false
cors: {
allowedOrigins: [
'http://localhost:3000'
Expand Down

0 comments on commit 4a0ed49

Please sign in to comment.