Skip to content

Commit

Permalink
fix: bicep updated (#1527)
Browse files Browse the repository at this point in the history
Co-authored-by: Roopan P M <v-roopanpm@microsoft.com>
  • Loading branch information
AjitPadhi-Microsoft and Roopan-Microsoft authored Nov 26, 2024
1 parent 8f8cc98 commit 15b948c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 6 additions & 3 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions infra/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.31.34.60546",
"templateHash": "500949809707316311"
"templateHash": "9243131736696562084"
}
},
"parameters": {
Expand Down Expand Up @@ -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')]",
Expand Down Expand Up @@ -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]"
Expand Down Expand Up @@ -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]"
Expand Down Expand Up @@ -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]"
Expand Down

0 comments on commit 15b948c

Please sign in to comment.