Skip to content

Commit

Permalink
Merge pull request #2 from AjitPadhi-Microsoft/dev
Browse files Browse the repository at this point in the history
Updated git workflow and bicep for multiple container
  • Loading branch information
AjitPadhi-Microsoft authored Oct 29, 2024
2 parents 6feb34d + 65bce4d commit 2e88be4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Build Docker Image and optionally push
- name: Build Docker Image and optionally push
uses: docker/build-push-action@v6
with:
context: .
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ azd-login: ## 🔑 Login to Azure with azd and a SPN
az-login: ## 🔑 Login to Azure with az and a SPN
az login --service-principal -u ${AZURE_CLIENT_ID} -p ${AZURE_CLIENT_SECRET} --tenant ${AZURE_TENANT_ID}

deploy: azd-login ## 🚀 Deploy everything to Azure
deploy: azd-login az-login ## 🚀 Deploy everything to Azure
@echo -e "\e[34m$@\e[0m" || true
@azd env new ${AZURE_ENV_NAME}
@azd env set AZURE_APP_SERVICE_HOSTING_MODEL code --no-prompt
Expand Down
14 changes: 11 additions & 3 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,14 @@ param authType string = 'keys'
])
param hostingModel string = 'container'

@description('The branch name to deploy the services')
@allowed([
'main'
'dev'
'demo'
])
param branch string = 'main'

@allowed([
'CRITICAL'
'ERROR'
Expand Down Expand Up @@ -623,7 +631,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'
dockerFullImageName: 'fruoccopublic.azurecr.io/rag-webapp:${branch == 'main' ? 'latest' : branch}'
appServicePlanId: hostingplan.outputs.name
applicationInsightsName: monitoring.outputs.applicationInsightsName
healthCheckPath: '/api/health'
Expand Down Expand Up @@ -783,7 +791,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'
dockerFullImageName: 'fruoccopublic.azurecr.io/rag-adminwebapp:${branch == 'main' ? 'latest' : branch}'
appServicePlanId: hostingplan.outputs.name
applicationInsightsName: monitoring.outputs.applicationInsightsName
azureOpenAIName: openai.outputs.name
Expand Down Expand Up @@ -958,7 +966,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'
dockerFullImageName: 'fruoccopublic.azurecr.io/rag-backend:${branch == 'main' ? 'latest' : branch}'
appServicePlanId: hostingplan.outputs.name
applicationInsightsName: monitoring.outputs.applicationInsightsName
azureOpenAIName: openai.outputs.name
Expand Down

0 comments on commit 2e88be4

Please sign in to comment.