|
| 1 | +{ |
| 2 | + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", |
| 3 | + "contentVersion": "1.0.0.0", |
| 4 | + "parameters": { |
| 5 | + "resourcePrefix": { |
| 6 | + "minLength": 3, |
| 7 | + "maxLength": 15, |
| 8 | + "type": "string", |
| 9 | + "metadata": { |
| 10 | + "description": "Resource prefix for all the resource provisioned. This should be an alphanumeric string. Note: please keep the `resourcePrefix` short, since some of the Azure resources need the full name to be less than 24 characters. It's recommended that to keep `resource_prefix` less than 15 characters." |
| 11 | + } |
| 12 | + } |
| 13 | + }, |
| 14 | + "variables": { |
| 15 | + "location": "[resourceGroup().location]", |
| 16 | + "tenantId": "[subscription().tenantId]", |
| 17 | + "webAppName": "[concat(parameters('resourcePrefix'),'webapp' )]", |
| 18 | + "webAppPlanName": "[concat(parameters('resourcePrefix'),'appplan' )]", |
| 19 | + "webAppPlanSku": "B1", |
| 20 | + "webAppAPIVersion": "2021-03-01", |
| 21 | + "preBuiltdockerImage": "scalaone/azure-openai-proxy:latest" |
| 22 | + }, |
| 23 | + "functions": [], |
| 24 | + "resources": [ |
| 25 | + { |
| 26 | + "type": "Microsoft.Web/serverfarms", |
| 27 | + "apiVersion": "[variables('webAppAPIVersion')]", |
| 28 | + "name": "[variables('webAppPlanName')]", |
| 29 | + "location": "[variables('location')]", |
| 30 | + "sku": { |
| 31 | + "name": "[variables('webAppPlanSku')]" |
| 32 | + }, |
| 33 | + "kind": "linux", |
| 34 | + "properties": { |
| 35 | + "reserved": true |
| 36 | + } |
| 37 | + }, |
| 38 | + { |
| 39 | + "type": "Microsoft.Web/sites", |
| 40 | + "apiVersion": "[variables('webAppAPIVersion')]", |
| 41 | + "name": "[variables('webAppName')]", |
| 42 | + "location": "[variables('location')]", |
| 43 | + "dependsOn": [ |
| 44 | + "[resourceId('Microsoft.Web/serverfarms', variables('webAppPlanName'))]" |
| 45 | + ], |
| 46 | + "kind": "app,linux,container", |
| 47 | + "identity": { |
| 48 | + "type": "SystemAssigned" |
| 49 | + }, |
| 50 | + "properties": { |
| 51 | + "name": "[variables('webAppName')]", |
| 52 | + "httpsOnly": "true", |
| 53 | + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('webAppPlanName'))]", |
| 54 | + "siteConfig": { |
| 55 | + "linuxFxVersion": "[concat('DOCKER|', variables('preBuiltdockerImage'))]", |
| 56 | + "alwaysOn": true, |
| 57 | + "ftpsState": "Disabled", |
| 58 | + "appSettings": [ |
| 59 | + { |
| 60 | + "name": "WEBSITES_PORT", |
| 61 | + "value": "3000" |
| 62 | + }, |
| 63 | + { |
| 64 | + "name": "DOCKER_REGISTRY_SERVER_URL", |
| 65 | + "value": "https://index.docker.io/v1" |
| 66 | + }, |
| 67 | + { |
| 68 | + "name": "DOCKER_ENABLE_CI", |
| 69 | + "value": "true" |
| 70 | + } |
| 71 | + ] |
| 72 | + } |
| 73 | + } |
| 74 | + } |
| 75 | + ], |
| 76 | + "outputs": {} |
| 77 | +} |
0 commit comments