From 7d1b90e25db9f50c43b38717c31b5380ec7fef66 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 14 Nov 2024 20:28:27 +0100 Subject: [PATCH] re enable container app --- infrastructure/app.bicep | 134 +++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/infrastructure/app.bicep b/infrastructure/app.bicep index e6e63c7..04a4bdd 100644 --- a/infrastructure/app.bicep +++ b/infrastructure/app.bicep @@ -18,73 +18,73 @@ resource environment 'Microsoft.App/managedEnvironments@2024-03-01' = { } } -// resource app 'Microsoft.App/containerApps@2024-03-01' = { -// name: 'acr-${context.locationAbbreviation}-${context.environment}-${context.projectName}-app' -// location: context.location -// identity: { -// type: 'SystemAssigned' -// } -// properties: { -// environmentId: environment.id +resource app 'Microsoft.App/containerApps@2024-03-01' = { + name: 'acr-${context.locationAbbreviation}-${context.environment}-${context.projectName}-app' + location: context.location + identity: { + type: 'SystemAssigned' + } + properties: { + environmentId: environment.id -// configuration: { -// activeRevisionsMode: 'Single' + configuration: { + activeRevisionsMode: 'Single' -// ingress: { -// external: true -// targetPort: 8080 -// transport: 'http2' -// allowInsecure: false -// traffic: [ -// { -// weight: 100 -// latestRevision: true -// } -// ] -// corsPolicy: { -// allowedOrigins: [ -// // 'https://localhost:3000' -// '*' -// ] -// allowCredentials: true -// allowedHeaders: ['*'] -// allowedMethods: ['Get, POST'] -// maxAge: 0 -// } -// } -// registries: [ -// { -// identity: 'system' -// server: registry.properties.loginServer -// } -// ] -// } + ingress: { + external: true + targetPort: 8080 + transport: 'http2' + allowInsecure: false + traffic: [ + { + weight: 100 + latestRevision: true + } + ] + corsPolicy: { + allowedOrigins: [ + // 'https://localhost:3000' + '*' + ] + allowCredentials: true + allowedHeaders: ['*'] + allowedMethods: ['Get, POST'] + maxAge: 0 + } + } + registries: [ + { + identity: 'system' + server: registry.properties.loginServer + } + ] + } -// template: { -// containers: [ -// { -// image: '${registry.properties.loginServer}/${context.projectName}-${appName}:${version}' -// name: '${context.projectName}-${appName}' -// resources: { -// cpu: json('0.25') -// memory: '0.5Gi' -// } -// } -// ] -// scale: { -// minReplicas: 1 -// maxReplicas: 2 -// rules: [ -// { -// name: 'http-rule' -// http: { -// metadata: { -// concurrentRequests: '50' -// } -// } -// } -// ] -// } -// } -// } -// } + template: { + containers: [ + { + image: '${registry.properties.loginServer}/${context.projectName}-${appName}:${version}' + name: '${context.projectName}-${appName}' + resources: { + cpu: json('0.25') + memory: '0.5Gi' + } + } + ] + scale: { + minReplicas: 1 + maxReplicas: 2 + rules: [ + { + name: 'http-rule' + http: { + metadata: { + concurrentRequests: '50' + } + } + } + ] + } + } + } +}