Skip to content

Commit a4bc037

Browse files
committed
Update azuredeploy.bicep
1 parent 81849d6 commit a4bc037

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

Labs/deploy/azuredeploy.bicep

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ var appServiceSettings = {
104104
}
105105
web: {
106106
name: '${name}-web'
107+
pythonVersion: '3.11'
107108
/*
108109
git: {
109110
repo: appGitRepository
@@ -113,6 +114,7 @@ var appServiceSettings = {
113114
}
114115
api: {
115116
name: '${name}-api'
117+
pythonVersion: '3.11'
116118
/*
117119
git: {
118120
repo: appGitRepository
@@ -218,9 +220,8 @@ resource openAiCompletionsModelDeployment 'Microsoft.CognitiveServices/accounts/
218220

219221

220222

221-
222223
/* *************************************************************** */
223-
/* App Hosting - Azure App Service */
224+
/* App Plan Hosting - Azure App Service Plan */
224225
/* *************************************************************** */
225226

226227
resource appServicePlan 'Microsoft.Web/serverfarms@2022-03-01' = {
@@ -229,14 +230,26 @@ resource appServicePlan 'Microsoft.Web/serverfarms@2022-03-01' = {
229230
sku: {
230231
name: appServiceSettings.plan.sku
231232
}
233+
kind: 'linux'
234+
properties: {
235+
reserved: true
236+
}
232237
}
233238

239+
240+
/* *************************************************************** */
241+
/* App Hosting - Azure App Service */
242+
/* *************************************************************** */
243+
234244
resource appServiceWeb 'Microsoft.Web/sites@2022-03-01' = {
235245
name: appServiceSettings.web.name
236246
location: location
237247
properties: {
238248
serverFarmId: appServicePlan.id
239249
httpsOnly: true
250+
siteConfig: {
251+
pythonVersion: appServiceSettings.web.pythonVersion
252+
}
240253
}
241254
}
242255

@@ -315,6 +328,7 @@ resource appServiceFunction 'Microsoft.Web/sites@2022-03-01' = {
315328
serverFarmId: appServicePlan.id
316329
httpsOnly: true
317330
siteConfig: {
331+
pythonVersion: appServiceSettings.api.pythonVersion
318332
alwaysOn: true
319333
}
320334
}
@@ -331,7 +345,7 @@ resource appServiceFunctionSettings 'Microsoft.Web/sites/config@2022-03-01' = {
331345
AzureWebJobsStorage: 'DefaultEndpointsProtocol=https;AccountName=${name}fnstorage;EndpointSuffix=core.windows.net;AccountKey=${storageAccount.listKeys().keys[0].value}'
332346
APPLICATIONINSIGHTS_CONNECTION_STRING: appServiceFunctionsInsights.properties.ConnectionString
333347
FUNCTIONS_EXTENSION_VERSION: '~4'
334-
FUNCTIONS_WORKER_RUNTIME: 'dotnet-isolated'
348+
FUNCTIONS_WORKER_RUNTIME: 'python'
335349
OPENAI__ENDPOINT: openAiAccount.properties.endpoint
336350
OPENAI__KEY: openAiAccount.listKeys().key1
337351
OPENAI__EMBEDDINGSDEPLOYMENT: openAiEmbeddingsModelDeployment.name

0 commit comments

Comments
 (0)