Skip to content

Commit

Permalink
App Service - Enabling Health Check (#2535)
Browse files Browse the repository at this point in the history
* App Service - Enabling Health Check

* Updating template versions
  • Loading branch information
amankumarrr authored Apr 29, 2024
1 parent 96b7ec0 commit 6dd2d50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions infra/appService-create-pr-slot.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ var appSettings = [
]


resource prodSlot 'Microsoft.Web/sites@2022-03-01' existing = {
resource prodSlot 'Microsoft.Web/sites@2023-01-01' existing = {
name: appServiceName
}

resource prSlot 'Microsoft.Web/sites/slots@2021-02-01' = {
resource prSlot 'Microsoft.Web/sites/slots@2023-01-01' = {
name: slotName
parent: prodSlot
location: location
Expand Down
7 changes: 5 additions & 2 deletions infra/appService.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ param dockerRegistryServerURL string
param appInsightConnectionString string
param keyVaultName string

param healthCheckPath string = '/'

@allowed([
'B1'
'B2'
Expand Down Expand Up @@ -131,7 +133,7 @@ var appSettings = [
var productionName = 'app-${projectName}-${entropy}'
var kind = 'app,linux,container'

resource appService 'Microsoft.Web/sites@2022-03-01' = {
resource appService 'Microsoft.Web/sites@2023-01-01' = {
name: productionName
location: location
kind: 'app,linux,container'
Expand All @@ -151,12 +153,13 @@ resource appService 'Microsoft.Web/sites@2022-03-01' = {
http20Enabled: true
minTlsVersion: '1.2'
linuxFxVersion: 'DOCKER|${acr.properties.loginServer}/${dockerImage}:production'
healthCheckPath: healthCheckPath
}
clientAffinityEnabled: false
}
}

resource stagingSlot 'Microsoft.Web/sites/slots@2022-09-01' = {
resource stagingSlot 'Microsoft.Web/sites/slots@2023-01-01' = {
parent: appService
name: 'staging'
location: location
Expand Down

0 comments on commit 6dd2d50

Please sign in to comment.