From b49fa15a867133d89b7fa6b9867066d613771436 Mon Sep 17 00:00:00 2001 From: nsxshota Date: Tue, 21 Nov 2023 09:56:46 +0900 Subject: [PATCH] modified: frontend cloudMap --- deploy/scripts/cdk/lib/construct/frontend.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/deploy/scripts/cdk/lib/construct/frontend.ts b/deploy/scripts/cdk/lib/construct/frontend.ts index e4463000d..e61bd9a75 100644 --- a/deploy/scripts/cdk/lib/construct/frontend.ts +++ b/deploy/scripts/cdk/lib/construct/frontend.ts @@ -63,7 +63,7 @@ export class FrontEndCluster extends Construct { }, ], }); - + const frontendServiceName = 'langflow-frontend-service' const frontendService = new ecs.FargateService( this, 'FrontendService', @@ -75,11 +75,18 @@ export class FrontEndCluster extends Construct { taskDefinition: frontendTaskDefinition, enableExecuteCommand: true, securityGroups: [props.ecsFrontSG], - // healthCheckGracePeriod: Duration.seconds(300), + cloudMapOptions: { + cloudMapNamespace: props.cloudmapNamespace, + containerPort: containerPort, + dnsRecordType: servicediscovery.DnsRecordType.A, + dnsTtl: Duration.seconds(10), + name: frontendServiceName + }, + healthCheckGracePeriod: Duration.seconds(1000), } ); - // props.targetGroup.addTarget(frontendService); + props.targetGroup.addTarget(frontendService); // // Create ALB and ECS Fargate Service // const frontService = new ecs_patterns.ApplicationLoadBalancedFargateService(