Skip to content

Commit efce61a

Browse files
Refactor Bicep parameters and update Dockerfile for improved clarity and consistency
1 parent 271ec5a commit efce61a

2 files changed

Lines changed: 10 additions & 13 deletions

File tree

infra/main_custom.bicep

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,10 @@ param vmSize string?
7070

7171
@description('Optional. Admin username for the Jumpbox Virtual Machine. Set to custom value if enablePrivateNetworking is true.')
7272
@secure()
73-
//param vmAdminUsername string = take(newGuid(), 20)
7473
param vmAdminUsername string?
7574

7675
@description('Optional. Admin password for the Jumpbox Virtual Machine. Set to custom value if enablePrivateNetworking is true.')
7776
@secure()
78-
//param vmAdminPassword string = newGuid()
7977
param vmAdminPassword string?
8078

8179
@description('Optional. Specifies the resource tags for all the resources. Tag "azd-env-name" is automatically added to all resources.')
@@ -93,8 +91,8 @@ param gptModelDeploymentType string = 'GlobalStandard'
9391
param gptModelName string = 'gpt-4o'
9492

9593
@minLength(1)
96-
@description('Optional. Set the Image tag. Defaults to latest_2025-09-22_455.')
97-
param imageVersion string = 'latest_2025-09-22_455'
94+
@description('Optional. Set the Image tag. Defaults to latest.')
95+
param imageVersion string = 'latest'
9896

9997
@minLength(1)
10098
@description('Optional. Version of the GPT model to deploy. Defaults to 2024-08-06.')
@@ -328,7 +326,9 @@ module jumpboxVM 'br/public:avm/res/compute/virtual-machine:0.15.0' = if (enable
328326
vmSize: vmSize ?? 'Standard_DS2_v2'
329327
location: location
330328
adminUsername: vmAdminUsername ?? 'JumpboxAdminUser'
331-
adminPassword: vmAdminPassword ?? 'JumpboxAdminP@ssw0rd1234!'
329+
// WARNING: vmAdminPassword parameter is required when enablePrivateNetworking is true.
330+
// Do not use default credentials in production environments.
331+
adminPassword: vmAdminPassword!
332332
tags: tags
333333
zone: 0
334334
imageReference: {
@@ -687,10 +687,6 @@ module containerAppBackend 'br/public:avm/res/app/container-app:0.17.0' = {
687687
name: 'AI_PROJECT_ENDPOINT'
688688
value: aiServices.outputs.aiProjectInfo.apiEndpoint // or equivalent
689689
}
690-
{
691-
name: 'AZURE_AI_AGENT_PROJECT_CONNECTION_STRING' // This was not really used in code.
692-
value: aiServices.outputs.aiProjectInfo.apiEndpoint
693-
}
694690
{
695691
name: 'AZURE_AI_AGENT_PROJECT_NAME'
696692
value: aiServices.outputs.aiProjectInfo.name
@@ -805,7 +801,7 @@ module containerAppFrontend 'br/public:avm/res/app/container-app:0.17.0' = {
805801
image: !empty(frontendImageName) ? frontendImageName : 'cmsacontainerreg.azurecr.io/cmsafrontend:${imageVersion}'
806802
name: 'cmsafrontend'
807803
resources: {
808-
cpu: '1'
804+
cpu: 1
809805
memory: '2.0Gi'
810806
}
811807
}
@@ -845,7 +841,6 @@ output AZURE_CONTAINER_REGISTRY_ENDPOINT string = containerRegistry.properties.l
845841
output AZURE_OPENAI_ENDPOINT string = 'https://${aiServices.outputs.name}.openai.azure.com/'
846842
output AZURE_AI_AGENT_PROJECT_NAME string = aiServices.outputs.aiProjectInfo.name
847843
output AZURE_AI_AGENT_ENDPOINT string = aiServices.outputs.aiProjectInfo.apiEndpoint
848-
output AZURE_AI_AGENT_PROJECT_CONNECTION_STRING string = aiServices.outputs.aiProjectInfo.apiEndpoint
849844
output AZURE_AI_AGENT_RESOURCE_GROUP_NAME string = resourceGroup().name
850845
output AZURE_AI_AGENT_SUBSCRIPTION_ID string = subscription().subscriptionId
851846
output AI_PROJECT_ENDPOINT string = aiServices.outputs.aiProjectInfo.apiEndpoint

src/frontend/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Build stage
2-
FROM node:18 AS build
2+
FROM node:18-alpine AS build
33

44
WORKDIR /app
55

66
# Copy package files
77
COPY package*.json ./
88

99
# Install dependencies
10-
RUN npm install
10+
RUN npm ci
1111

1212
# Copy frontend source
1313
COPY . .
@@ -16,6 +16,8 @@ COPY . .
1616
RUN npm run build
1717

1818
# Runtime stage
19+
# Note: Using Python runtime to serve frontend via uvicorn for integration with backend API
20+
# This allows unified deployment architecture for both frontend and backend services
1921
FROM python:3.11-slim
2022

2123
WORKDIR /app

0 commit comments

Comments
 (0)