Skip to content

Commit

Permalink
fix: set healthcheck to success on 401 status
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOrangePuff committed May 22, 2023
1 parent 77249fc commit 44167e2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/prerender-fargate/lib/prerender-fargate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ export class PrerenderFargate extends Construct {
}
);

fargateService.targetGroup.configureHealthCheck({
path: "/health",
interval: Duration.seconds(120),
unhealthyThresholdCount: 5,
healthyHttpCodes: '401'
});

// Setup AutoScaling policy
const scaling = fargateService.service.autoScaleTaskCount({
maxCapacity: props.maxInstanceCount || 2,
Expand Down

0 comments on commit 44167e2

Please sign in to comment.