-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwordpress.json
160 lines (156 loc) · 6.25 KB
/
wordpress.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
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"variables": {
"hostingPlanName": "[replace(resourceGroup().name,'.','')]",
"dbServerName": "[concat('mysqlsrv', uniqueString(resourceGroup().id))]",
"dbName": "[concat('mysqldb', uniqueString(resourceGroup().id))]",
"dbUser": "mysqldbuser",
"dbUserPass": "Micr0s0ft",
"siteName": "[concat(toLower(variables('hostingPlanName')), uniqueString(resourceGroup().id))]",
"sku": "S1",
"dockerUrl": "https://index.docker.io",
"dockerImage": "azureossd/wordpress:v1.3",
"gitRepo": "https://github.com/azureappserviceoss/wordpress-azure",
"gitBranch": "linux-appservice"
},
"resources": [
{
"apiVersion": "2020-06-01",
"name": "[variables('hostingPlanName')]",
"type": "Microsoft.Web/serverfarms",
"location": "[resourceGroup().location]",
"sku": {
"name": "[variables('sku')]"
},
"kind": "linux",
"properties": {
"reserved": true
}
},
{
"apiVersion": "2020-06-01",
"location": "[resourceGroup().location]",
"name": "[variables('siteName')]",
"type": "Microsoft.Web/sites",
"properties": {
"siteConfig": {
"linuxFxVersion": "[concat('DOCKER|', variables('dockerImage'))]",
"appSettings": [
{
"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
"value": "true"
},
{
"name": "DATABASE_HOST",
"value": "[concat(variables('dbServerName'), '.mysql.database.azure.com')]"
},
{
"name": "DATABASE_NAME",
"value": "[variables('dbName')]"
},
{
"name": "DATABASE_PASSWORD",
"value": "[variables('dbUserPass')]"
},
{
"name": "DATABASE_USERNAME",
"value": "[concat(variables('dbUser'))]"
},
{
"name": "DOCKER_REGISTRY_SERVER_URL",
"value": "[variables('dockerUrl')]"
},
{
"name": "GIT_BRANCH",
"value": "[variables('gitBranch')]"
},
{
"name": "GIT_REPO",
"value": "[variables('gitRepo')]"
}
],
"connectionStrings": [
{
"name": "defaultConnection",
"ConnectionString": "[concat('Database=', variables('dbName'), ';Data Source=', variables('dbServerName') ,'.mysql.database.azure.com;User Id=',variables('dbUser'),'@',variables('dbServerName') ,';Password=',variables('dbUserPass'))]",
"type": "MySQL"
}
]
},
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]"
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]"
]
},
{
"name": "[variables('dbServerName')]",
"type": "Microsoft.DBforMySQL/flexibleServers",
"apiVersion": "2021-05-01",
"location": "[resourceGroup().location]",
"properties": {
"version": "8.0.21",
"createMode": "Default",
"administratorLogin": "[variables('dbUser')]",
"administratorLoginPassword": "[variables('dbUserPass')]",
"sslEnforcement": "Disabled",
"storage": {
"storageSizeGB": 20,
"iops": 360,
"autoGrow": "Enabled",
"storageSku": "Premium_LRS"
},
"backup": {
"backupRetentionDays": 7,
"geoRedundantBackup": "Disabled",
"earliestRestoreDate": "2024-05-13T14:46:05.9748431+00:00"
}
},
"sku": {
"name": "Standard_B1ms",
"tier": "Burstable"
},
"resources": [
{
"name": "ALLALLOW",
"type": "firewallRules",
"apiVersion": "2020-07-01-preview",
"properties": {
"startIpAddress": "0.0.0.0",
"endIpAddress": "255.255.255.255"
},
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.DBforMySQL/flexibleServers/', variables('dbServerName'))]"
]
},
{
"type": "configurations",
"apiVersion": "2023-06-30",
"name": "require_secure_transport",
"properties": {
"currentValue": "OFF",
"source": "user-override",
"value": "OFF"
},
"dependsOn": [
"[concat('Microsoft.DBforMySQL/flexibleServers/', variables('dbServerName'))]"
]
},
{
"name": "[variables('dbName')]",
"type": "databases",
"apiVersion": "2023-06-30",
"properties": {
"charset": "utf8",
"collation": "utf8_general_ci"
},
"dependsOn": [
"[concat('Microsoft.DBforMySQL/flexibleServers/', variables('dbServerName'))]"
]
}
]
}
]
}