diff --git a/infra/main.bicep b/infra/main.bicep index d828187c6..d0e21d59c 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -329,6 +329,9 @@ var azureOpenAIEmbeddingModelInfo = string({ modelVersion: azureOpenAIEmbeddingModelVersion }) +var appversion = 'latest' // Update GIT deployment branch +var registryName = 'fruoccopublic' // Update Registry name + // Organize resources in a resource group resource rg 'Microsoft.Resources/resourceGroups@2021-04-01' = { name: rgName @@ -639,7 +642,7 @@ module web_docker './app/web.bicep' = if (hostingModel == 'container') { name: '${websiteName}-docker' location: location tags: union(tags, { 'azd-service-name': 'web-docker' }) - dockerFullImageName: 'fruoccopublic.azurecr.io/rag-webapp:latest' + dockerFullImageName: '${registryName}.azurecr.io/rag-webapp:${appversion}' appServicePlanId: hostingplan.outputs.name applicationInsightsName: monitoring.outputs.applicationInsightsName healthCheckPath: '/api/health' @@ -799,7 +802,7 @@ module adminweb_docker './app/adminweb.bicep' = if (hostingModel == 'container') name: '${adminWebsiteName}-docker' location: location tags: union(tags, { 'azd-service-name': 'adminweb-docker' }) - dockerFullImageName: 'fruoccopublic.azurecr.io/rag-adminwebapp:latest' + dockerFullImageName: '${registryName}.azurecr.io/rag-adminwebapp:${appversion}' appServicePlanId: hostingplan.outputs.name applicationInsightsName: monitoring.outputs.applicationInsightsName azureOpenAIName: openai.outputs.name @@ -974,7 +977,7 @@ module function_docker './app/function.bicep' = if (hostingModel == 'container') name: '${functionName}-docker' location: location tags: union(tags, { 'azd-service-name': 'function-docker' }) - dockerFullImageName: 'fruoccopublic.azurecr.io/rag-backend:latest' + dockerFullImageName: '${registryName}.azurecr.io/rag-backend:${appversion}' appServicePlanId: hostingplan.outputs.name applicationInsightsName: monitoring.outputs.applicationInsightsName azureOpenAIName: openai.outputs.name diff --git a/infra/main.json b/infra/main.json index 9d10e2e23..2ad41a12e 100644 --- a/infra/main.json +++ b/infra/main.json @@ -5,7 +5,7 @@ "_generator": { "name": "bicep", "version": "0.31.34.60546", - "templateHash": "500949809707316311" + "templateHash": "9243131736696562084" } }, "parameters": { @@ -643,6 +643,8 @@ "keyVaultName": "[format('kv-{0}', parameters('resourceToken'))]", "azureOpenAIModelInfo": "[string(createObject('model', parameters('azureOpenAIModel'), 'modelName', parameters('azureOpenAIModelName'), 'modelVersion', parameters('azureOpenAIModelVersion')))]", "azureOpenAIEmbeddingModelInfo": "[string(createObject('model', parameters('azureOpenAIEmbeddingModel'), 'modelName', parameters('azureOpenAIEmbeddingModelName'), 'modelVersion', parameters('azureOpenAIEmbeddingModelVersion')))]", + "appversion": "latest", + "registryName": "fruoccopublic", "defaultOpenAiDeployments": [ { "name": "[parameters('azureOpenAIModel')]", @@ -3256,7 +3258,7 @@ "value": "[union(variables('tags'), createObject('azd-service-name', 'web-docker'))]" }, "dockerFullImageName": { - "value": "fruoccopublic.azurecr.io/rag-webapp:latest" + "value": "[format('{0}.azurecr.io/rag-webapp:{1}', variables('registryName'), variables('appversion'))]" }, "appServicePlanId": { "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', parameters('hostingPlanName')), '2022-09-01').outputs.name.value]" @@ -5235,7 +5237,7 @@ "value": "[union(variables('tags'), createObject('azd-service-name', 'adminweb-docker'))]" }, "dockerFullImageName": { - "value": "fruoccopublic.azurecr.io/rag-adminwebapp:latest" + "value": "[format('{0}.azurecr.io/rag-adminwebapp:{1}', variables('registryName'), variables('appversion'))]" }, "appServicePlanId": { "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', parameters('hostingPlanName')), '2022-09-01').outputs.name.value]" @@ -9250,7 +9252,7 @@ "value": "[union(variables('tags'), createObject('azd-service-name', 'function-docker'))]" }, "dockerFullImageName": { - "value": "fruoccopublic.azurecr.io/rag-backend:latest" + "value": "[format('{0}.azurecr.io/rag-backend:{1}', variables('registryName'), variables('appversion'))]" }, "appServicePlanId": { "value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', parameters('hostingPlanName')), '2022-09-01').outputs.name.value]"