-
Notifications
You must be signed in to change notification settings - Fork 332
Expand file tree
/
Copy pathdab-on-aca.bicep
More file actions
91 lines (81 loc) · 2.01 KB
/
dab-on-aca.bicep
File metadata and controls
91 lines (81 loc) · 2.01 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
@secure()
param connectionString string
param appName string
param environmentId string
param dabConfigFileName string = 'dab-config.json'
param mountedStorageName string = 'dabconfig'
param isExternalIngress bool = true
param location string = resourceGroup().location
param tag string = 'latest'
var dabConfigFilePath='--ConfigFileName=./${mountedStorageName}/${dabConfigFileName}'
resource containerApp 'Microsoft.App/containerApps@2023-05-01' = {
name: appName
location: location
properties: {
environmentId: environmentId
configuration: {
activeRevisionsMode:'Single'
ingress: {
allowInsecure:true
external: isExternalIngress
targetPort: 5000
transport: 'auto'
}
}
template: {
containers: [
{
image: 'mcr.microsoft.com/azure-databases/data-api-builder:${tag}'
name: appName
env: [
{
name: 'DOTNET_ENVIRONMENT'
value: 'Production'
}
{
name: 'ASPNETCORE_ENVIRONMENT'
value: 'Production'
}
{
name: 'DATABASE_CONNECTION_STRING'
value: connectionString
}
]
args: [dabConfigFilePath]
volumeMounts: [
{
volumeName: 'azure-file-volume'
mountPath: '/App/${mountedStorageName}'
}
]
resources:{
cpu: json('0.5')
memory:'1Gi'
}
}
]
scale: {
minReplicas: 0
maxReplicas: 2
rules:[
{
name: 'http'
http:{
metadata:{
concurrentRequests: '200'
}
}
}
]
}
volumes:[
{
name:'azure-file-volume'
storageType:'AzureFile'
storageName: mountedStorageName
}
]
}
}
}
output fqdn string = containerApp.properties.configuration.ingress.fqdn