Skip to content

Instantly share code, notes, and snippets.

@aarongustafson
Created September 22, 2016 15:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save aarongustafson/d24e1653f2473caa546e462a27cd9e58 to your computer and use it in GitHub Desktop.
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"siteName": {
"type": "string",
"metadata": {
"description": "The name of the web app that you wish to create."
}
},
"hostingPlanName": {
"type": "string",
"metadata": {
"description": "The name of the App Service plan to use for hosting the web app."
}
},
"sku": {
"type": "string",
"allowedValues": [
"F1",
"D1",
"B1",
"B2",
"B3",
"S1",
"S2",
"S3",
"P1",
"P2",
"P3",
"P4"
],
"defaultValue": "S1",
"metadata": {
"description": "The pricing tier for the hosting plan."
}
},
"workerSize": {
"type": "string",
"allowedValues": [
"0",
"1",
"2"
],
"defaultValue": "0",
"metadata": {
"description": "The instance size of the hosting plan (small, medium, or large)."
}
},
"repo": {
"type": "string",
"metadata": {
"description": "The URL for the GitHub repository that contains the project to deploy."
}
},
"branch": {
"type": "string",
"defaultValue": "master",
"metadata": {
"description": "The branch of the GitHub repository to use."
}
},
"python": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The python version to use."
}
},
"node": {
"type": "string",
"defaultValue": "6.3.0",
"metadata": {
"description": "The node version to use."
}
},
"net": {
"type": "string",
"defaultValue": "v4.6",
"metadata": {
"description": "The .NET version to use."
}
},
"php": {
"type": "string",
"defaultValue": "5.6",
"metadata": {
"description": "The php version to use."
}
},
"environment": {
"type": "object",
"defaultValue": {
"WEBSITE_NODE_DEFAULT_VERSION": "6.3.0"
},
"metadata": {
"description": "The php version to use."
}
}
},
"resources": [
{
"apiVersion": "2015-08-01",
"name": "[parameters('hostingPlanName')]",
"type": "Microsoft.Web/serverfarms",
"location": "[resourceGroup().location]",
"sku": {
"name": "[parameters('sku')]",
"capacity": "[parameters('workerSize')]"
},
"properties": {
"name": "[parameters('hostingPlanName')]"
}
},
{
"apiVersion": "2015-08-01",
"name": "[parameters('siteName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"
],
"properties": {
"serverFarmId": "[parameters('hostingPlanName')]"
},
"resources": [
{
"apiVersion": "2015-08-01",
"name": "appsettings",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/sites/', parameters('siteName'))]"
],
"tags": {
"displayName": "WebAppSettings"
},
"properties": "[parameters('environment')]"
},
{
"apiVersion": "2015-08-01",
"name": "web",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
],
"properties": {
"pythonVersion": "[parameters('python')]",
"phpVersion": "[parameters('php')]",
"netFrameworkVersion": "[parameters('net')]"
}
},
{
"apiVersion": "2015-08-01",
"name": "web",
"type": "sourcecontrols",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]",
"[concat('Microsoft.Web/sites/', parameters('siteName'), '/config/web')]"
],
"properties": {
"RepoUrl": "[parameters('repo')]",
"branch": "[parameters('branch')]",
"IsManualIntegration": true
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment