-
Notifications
You must be signed in to change notification settings - Fork 4
/
pythonapp-containerapp.bicep
75 lines (62 loc) · 1.63 KB
/
pythonapp-containerapp.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@description('Container apps environment name')
param environment_name string
@description('Container image name (registry/image:tag)')
param image_name string
@description('Private container registry login server')
param registry_login_server string
@description('Private container registry username')
param registry_username string
@description('Private container registry password')
param registry_password string
@description('Provide a location for the Container Apps resources')
param location string = resourceGroup().location
@description('Provide a URL for the nodeapp new order endpoint')
param nodeapp_url string = ''
resource nodeapp 'Microsoft.App/containerApps@2022-01-01-preview' = {
name: 'pythonapp'
location: location
properties: {
managedEnvironmentId: resourceId('Microsoft.App/managedEnvironments', environment_name)
configuration: {
dapr: {
enabled: true
appId: 'pythonapp'
}
secrets: [
{
name: 'registry-password'
value: registry_password
}
]
registries: [
{
server: registry_login_server
username: registry_username
passwordSecretRef: 'registry-password'
}
]
}
template: {
containers: [
{
image: image_name
name: 'pythonapp'
env: [
{
name: 'NODEAPP_URL'
value: nodeapp_url
}
]
resources: {
cpu: '0.5'
memory: '1Gi'
}
}
]
scale: {
minReplicas: 1
maxReplicas: 1
}
}
}
}