-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathwebapp-env.json
More file actions
104 lines (103 loc) · 2.89 KB
/
webapp-env.json
File metadata and controls
104 lines (103 loc) · 2.89 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
92
93
94
95
96
97
98
99
100
101
102
103
104
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"imagelocation": {
"type": "string"
},
"acr_username": {
"type": "string"
},
"acr_password": {
"type": "secureString"
},
"baseName": {
"type": "string",
"maxLength": 10,
"minLength": 3,
"metadata": {
"description": "The base name to use as prefix to create all the resources."
}
},
"location": {
"type": "string",
"metadata": {
"description": "Specifies the location for all resources."
}
},
"acr": {
"type": "string",
"defaultValue": "[concat(toLower(parameters('baseName')),'amlcr')]"
},
"webAppName": {
"type": "string",
"defaultValue": "[concat(toLower(parameters('baseName')),'webapp')]",
"metadata": {
"description": "Base name of the web app name and app service plan"
},
"minLength": 2
},
"sku": {
"type": "string",
"metadata": {
"description": "SKU for the app service plan"
},
"defaultValue": "S1"
}
},
"variables": {
"webAppPortalName": "[concat(parameters('webAppName'), '-webapp')]",
"appServicePlanName": "[concat(parameters('webAppName'),'AppServicePlan')]"
},
"resources": [
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2018-02-01",
"name": "[variables('appServicePlanName')]",
"location": "[parameters('location')]",
"sku": {
"name": "[parameters('sku')]"
},
"kind": "linux",
"properties": {
"reserved": true,
"maximumElasticWorkerCount": 5
}
},
{
"type": "Microsoft.Web/sites",
"apiVersion": "2018-11-01",
"name": "[variables('webAppPortalName')]",
"location": "[parameters('location')]",
"kind": "app,linux,container",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]"
],
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]",
"httpsOnly": true,
"siteConfig": {
"linuxFxVersion": "[concat('DOCKER|', parameters('imagelocation'))]",
"appSettings": [
{
"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
"value": "false"
},
{
"name": "DOCKER_REGISTRY_SERVER_URL",
"value": "[concat('https://', parameters('acr'), '.azurecr.io')]"
},
{
"name": "DOCKER_REGISTRY_SERVER_USERNAME",
"value": "[parameters('acr_username')]"
},
{
"name": "DOCKER_REGISTRY_SERVER_PASSWORD",
"value": "[parameters('acr_password')]"
}
]
}
}
}
]
}