-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
320 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
param name string | ||
param location string = resourceGroup().location | ||
param tags object = {} | ||
|
||
param allowedOrigins array = [] | ||
param appCommandLine string = '' | ||
param appInsightResourceId string | ||
param appServicePlanId string | ||
@secure() | ||
param appSettings object = {} | ||
param siteConfig object = {} | ||
param serviceName string = 'api' | ||
param linuxFxVersion string | ||
|
||
@description('Required. Type of site to deploy.') | ||
param kind string | ||
|
||
@description('Optional. If client affinity is enabled.') | ||
param clientAffinityEnabled bool = true | ||
|
||
@description('Optional. Required if app of kind functionapp. Resource ID of the storage account to manage triggers and logging function executions.') | ||
param storageAccountResourceId string? | ||
|
||
module api 'br/public:avm/res/web/site:0.6.0' = { | ||
name: '${name}-app-module' | ||
params: { | ||
kind: kind | ||
name: name | ||
serverFarmResourceId: appServicePlanId | ||
tags: union(tags, { 'azd-service-name': serviceName }) | ||
location: location | ||
appInsightResourceId: appInsightResourceId | ||
clientAffinityEnabled: clientAffinityEnabled | ||
storageAccountResourceId: storageAccountResourceId | ||
managedIdentities: { | ||
systemAssigned: true | ||
} | ||
siteConfig: union(siteConfig, { | ||
cors: { | ||
allowedOrigins: union(['https://portal.azure.com', 'https://ms.portal.azure.com'], allowedOrigins) | ||
} | ||
linuxFxVersion: linuxFxVersion | ||
appCommandLine: appCommandLine | ||
}) | ||
appSettingsKeyValuePairs: union(appSettings, { SCM_DO_BUILD_DURING_DEPLOYMENT: 'True', ENABLE_ORYX_BUILD: 'True' }) | ||
logsConfiguration: { | ||
applicationLogs: { fileSystem: { level: 'Verbose' } } | ||
detailedErrorMessages: { enabled: true } | ||
failedRequestsTracing: { enabled: true } | ||
httpLogs: { fileSystem: { enabled: true, retentionInDays: 1, retentionInMb: 35 } } | ||
} | ||
} | ||
} | ||
|
||
output SERVICE_API_IDENTITY_PRINCIPAL_ID string = api.outputs.systemAssignedMIPrincipalId | ||
output SERVICE_API_NAME string = api.outputs.name | ||
output SERVICE_API_URI string = 'https://${api.outputs.defaultHostname}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
param name string | ||
param location string = resourceGroup().location | ||
param tags object = {} | ||
param serviceName string = 'web' | ||
param appCommandLine string = 'pm2 serve /home/site/wwwroot --no-daemon --spa' | ||
param appInsightResourceId string | ||
param appServicePlanId string | ||
param linuxFxVersion string | ||
|
||
module web 'br/public:avm/res/web/site:0.6.0' = { | ||
name: '${name}-deployment' | ||
params: { | ||
kind: 'app' | ||
name: name | ||
serverFarmResourceId: appServicePlanId | ||
tags: union(tags, { 'azd-service-name': serviceName }) | ||
location: location | ||
appInsightResourceId: appInsightResourceId | ||
siteConfig: { | ||
appCommandLine: appCommandLine | ||
linuxFxVersion: linuxFxVersion | ||
alwaysOn: true | ||
} | ||
logsConfiguration: { | ||
applicationLogs: { fileSystem: { level: 'Verbose' } } | ||
detailedErrorMessages: { enabled: true } | ||
failedRequestsTracing: { enabled: true } | ||
httpLogs: { fileSystem: { enabled: true, retentionInDays: 1, retentionInMb: 35 } } | ||
} | ||
} | ||
} | ||
|
||
output SERVICE_WEB_IDENTITY_PRINCIPAL_ID string = web.outputs.systemAssignedMIPrincipalId | ||
output SERVICE_WEB_NAME string = web.outputs.name | ||
output SERVICE_WEB_URI string = 'https://${web.outputs.defaultHostname}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.