This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
forked from RadoslavGatev/Ghost-Azure
-
Notifications
You must be signed in to change notification settings - Fork 219
/
azuredeploy.json
169 lines (169 loc) · 5.42 KB
/
azuredeploy.json
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.2",
"parameters": {
"siteName": {
"type": "string"
},
"hostingPlanName": {
"type": "string"
},
"sku": {
"type": "string",
"allowedValues": [
"Basic",
"Standard",
"Premium"
],
"defaultValue": "Basic"
},
"Worker Size": {
"type": "string",
"allowedValues": [
"1",
"2",
"3"
],
"defaultValue": "1"
},
"Deploy App Insights": {
"type": "bool",
"defaultValue": true
},
"Email Service": {
"type": "string",
"allowedValues": [
"Not configured",
"Mailgun",
"Gmail",
"SendGrid"
],
"defaultValue": "Not configured"
},
"Email Username": {
"type": "string",
"defaultValue": ""
},
"Email Password": {
"type": "string",
"defaultValue": ""
},
"Email From Address": {
"type": "string",
"defaultValue": ""
},
"repoUrl": {
"type": "string",
"defaultValue": "https://github.com/<<PutYourGitHubUserHere>>/Ghost-Azure"
},
"branch": {
"type": "string",
"defaultValue": "master"
}
},
"variables": {
"skuMapping": "[if(equals(parameters('sku'), 'Free'), 'F', if(equals(parameters('sku'), 'Shared'), 'D', if(equals(parameters('sku'), 'Basic'), 'B', if(equals(parameters('sku'), 'Standard'), 'S', if(equals(parameters('sku'), 'Premium'), 'P', 'F')))))]",
"sku": "[concat(variables('skuMapping'), parameters('Worker Size'))]",
"appInsightsName": "[concat(parameters('siteName'), '-insights')]"
},
"resources": [
{
"name": "[parameters('hostingPlanName')]",
"type": "Microsoft.Web/serverfarms",
"location": "[resourceGroup().location]",
"apiVersion": "2018-02-01",
"sku": {
"name": "[variables('sku')]"
},
"dependsOn": [],
"properties": {
"name": "[parameters('hostingPlanName')]",
"numberOfWorkers": 1
}
},
{
"name": "[parameters('siteName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"apiVersion": "2018-11-01",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"
],
"tags": {
"[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName')))]": "Resource",
"displayName": "[parameters('siteName')]"
},
"properties": {
"name": "[parameters('siteName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"
},
"resources": [
{
"apiVersion": "2018-11-01",
"name": "web",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('siteName'))]"
],
"properties": {
"use32BitWorkerProcess": false,
"httpsOnly": true,
"alwaysOn": true
}
},
{
"name": "appsettings",
"type": "config",
"apiVersion": "2018-11-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('siteName'))]",
"[resourceId('Microsoft.Insights/components', variables('appInsightsName'))]"
],
"properties": {
"url": "[concat('https://', reference(resourceId('Microsoft.Web/sites', parameters('siteName'))).hostNames[0])]",
"mail__transport": "SMTP",
"mail__options__service": "[parameters('Email Service')]",
"mail__options__auth__user": "[parameters('Email Username')]",
"mail__options__auth__pass": "[parameters('Email Password')]",
"mail__from": "[parameters('Email From Address')]",
"WEBSITE_NODE_DEFAULT_VERSION": "~10",
"NODE_ENV": "production",
"APPINSIGHTS_INSTRUMENTATION_KEY": "[reference(concat('Microsoft.Insights/components/', variables('appInsightsName'))).InstrumentationKey]"
}
},
{
"name": "web",
"type": "sourcecontrols",
"apiVersion": "2018-11-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('siteName'))]",
"[resourceId('Microsoft.Web/sites/config', parameters('siteName'), 'appsettings')]"
],
"properties": {
"repoUrl": "[parameters('repoUrl')]",
"branch": "[parameters('branch')]",
"isManualIntegration": true,
"deploymentRollbackEnabled": true
}
}
]
},
{
"name": "[variables('appInsightsName')]",
"type": "Microsoft.Insights/components",
"location": "[resourceGroup().location]",
"apiVersion": "2014-04-01",
"condition": "[parameters('Deploy App Insights')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('siteName'))]"
],
"tags": {
"displayName": "[variables('appInsightsName')]"
},
"properties": {
"ApplicationId": "[resourceId('Microsoft.Web/sites', parameters('siteName'))]",
"Application_Type": "Node.JS"
}
}
]
}