Browse Source

Add support for private docker registry

pull/208/head
Clemens Wolff 5 years ago
parent
commit
e249f3b0ef
1 changed files with 40 additions and 1 deletions
  1. 41
      azuredeploy.json

41
azuredeploy.json

@ -90,6 +90,27 @@
"metadata": {
"description": "The Docker image to deploy."
}
},
"dockerRegistry": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The registry of the Docker image."
}
},
"dockerRegistryUserName": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The user name for the Docker registry."
}
},
"dockerRegistryPassword": {
"type": "securestring",
"defaultValue": "",
"metadata": {
"description": "The password for the Docker registry."
}
}
},
"variables": {
@ -102,7 +123,12 @@
"databaseServerName": "[concat(parameters('appName'),'-state')]",
"setupScriptName": "[concat(parameters('appName'),'-setup')]",
"appServicePlanName": "[concat(parameters('appName'),'-hosting')]",
"analyticsName": "[concat(parameters('appName'),'-analytics')]"
"analyticsName": "[concat(parameters('appName'),'-analytics')]",
"dockerRegistryCredential": {
"password": "[parameters('dockerRegistryPassword')]",
"username": "[parameters('dockerRegistryUserName')]",
"server": "[parameters('dockerRegistry')]"
}
},
"resources": [
{
@ -182,6 +208,7 @@
"apiVersion": "2018-10-01",
"location": "[variables('location')]",
"properties": {
"imageRegistryCredentials": "[if(equals(parameters('dockerRegistry'), ''), json('null'), array(variables('dockerRegistryCredential')))]",
"containers": [
{
"name": "createadmin",
@ -244,6 +271,18 @@
"name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE",
"value": "false"
},
{
"name": "DOCKER_REGISTRY_SERVER_URL",
"value": "[parameters('dockerRegistry')]"
},
{
"name": "DOCKER_REGISTRY_SERVER_USERNAME",
"value": "[parameters('dockerRegistryUserName')]"
},
{
"name": "DOCKER_REGISTRY_SERVER_PASSWORD",
"value": "[parameters('dockerRegistryPassword')]"
},
{
"name": "AZURE_APPINSIGHTS_IKEY",
"value": "[reference(resourceId('Microsoft.Insights/components', variables('analyticsName')), '2014-04-01').InstrumentationKey]"

Loading…
Cancel
Save