forked from MicrosoftLearning/eShopOnWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebapp-docker.bicep
51 lines (47 loc) · 1.13 KB
/
webapp-docker.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@description('Generate a Suffix based on the Resource Group ID')
param suffix string = uniqueString(resourceGroup().id)
@description('Use the Resource Group Location')
param location string = resourceGroup().location
resource acr 'Microsoft.ContainerRegistry/registries@2021-09-01' existing = {
name: 'cr${suffix}'
}
resource appServicePlan 'Microsoft.Web/serverfarms@2022-03-01' = {
name: 'asp-${suffix}'
location: location
kind: 'linux'
properties: {
reserved: true
}
sku: {
name: 'B1'
}
}
resource webApp 'Microsoft.Web/sites@2022-03-01' = {
name: 'app-${suffix}'
location: location
tags: {}
properties: {
siteConfig: {
acrUseManagedIdentityCreds: true
appSettings: [
{
name: 'UseOnlyInMemoryDatabase'
value: 'true'
}
{
name: 'ASPNETCORE_ENVIRONMENT'
value: 'Docker'
}
{
name: 'ASPNETCORE_HTTP_PORTS'
value: '80'
}
]
linuxFxVersion: 'DOCKER|${acr.properties.loginServer}/eshoponweb/web:latest'
}
serverFarmId: appServicePlan.id
}
identity: {
type: 'SystemAssigned'
}
}