-
Notifications
You must be signed in to change notification settings - Fork 548
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
1 parent
805ceb9
commit b9d10f5
Showing
9 changed files
with
145 additions
and
1 deletion.
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
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,59 @@ | ||
param location string = resourceGroup().location | ||
param applicationInsightsName string = '' | ||
param serviceName string = 'stripe' | ||
param apiUrl string | ||
param stripePublicKey string | ||
@secure() | ||
param stripeSecretKey string | ||
@secure() | ||
param stripeWebhookSecret string | ||
param containerAppsEnvironmentName string | ||
param containerRegistryName string | ||
param imageName string = '' | ||
param environmentName string | ||
|
||
var abbrs = loadJsonContent('../abbreviations.json') | ||
var resourceToken = toLower(uniqueString(subscription().id, environmentName, location)) | ||
|
||
module app '../core/host/container-app.bicep' = { | ||
name: '${serviceName}-container-app-module' | ||
params: { | ||
environmentName: environmentName | ||
serviceName: !empty(serviceName) ? serviceName : '${abbrs.appContainerApps}${serviceName}-${resourceToken}' | ||
location: location | ||
containerAppsEnvironmentName: containerAppsEnvironmentName | ||
containerRegistryName: containerRegistryName | ||
env: [ | ||
{ | ||
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING' | ||
value: applicationInsights.properties.ConnectionString | ||
} | ||
{ | ||
name: 'API_URL' | ||
value: apiUrl | ||
} | ||
{ | ||
name: 'STRIPE_PUBLIC_KEY' | ||
value: stripePublicKey | ||
} | ||
{ | ||
name: 'STRIPE_SECRET_KEY' | ||
value: stripeSecretKey | ||
} | ||
{ | ||
name: 'STRIPE_WEBHOOK_SECRET' | ||
value: stripeWebhookSecret | ||
} | ||
] | ||
imageName: !empty(imageName) ? imageName : 'nginx:latest' | ||
targetPort: 3000 | ||
} | ||
} | ||
|
||
resource applicationInsights 'Microsoft.Insights/components@2020-02-02' existing = { | ||
name: applicationInsightsName | ||
} | ||
|
||
output SERVICE_STRIPE_NAME string = app.outputs.name | ||
output SERVICE_STRIPE_URI string = app.outputs.uri | ||
output SERVICE_STRIPE_IMAGE_NAME string = app.outputs.imageName |
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,36 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"location": { | ||
"value": "${AZURE_LOCATION}" | ||
}, | ||
"environmentName": { | ||
"value": "${AZURE_ENV_NAME}" | ||
}, | ||
"imageName": { | ||
"value": "${SERVICE_BLOG_IMAGE_NAME}" | ||
}, | ||
"applicationInsightsName": { | ||
"value": "${APPLICATIONINSIGHTS_NAME}" | ||
}, | ||
"containerAppsEnvironmentName": { | ||
"value": "${AZURE_CONTAINER_ENVIRONMENT_NAME}" | ||
}, | ||
"containerRegistryName": { | ||
"value": "${AZURE_CONTAINER_REGISTRY_NAME}" | ||
}, | ||
"apiUrl": { | ||
"value": "${SERVICE_API_URI}" | ||
}, | ||
"stripePublicKey": { | ||
"value": "${STRIPE_PUBLIC_KEY}" | ||
}, | ||
"stripeSecretKey": { | ||
"value": "${STRIPE_SECRET_KEY}" | ||
}, | ||
"stripeWebhookSecret": { | ||
"value": "${STRIPE_WEBHOOK_SECRET}" | ||
} | ||
} | ||
} |
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