Skip to content

Commit

Permalink
πŸ’š Add portocol to alb target
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Jul 26, 2024
1 parent 65b55df commit 095a97b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions iac/Erpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Service, type StackContext, use } from "sst/constructs";
import { ConfigStack } from "./Config";
import { IndexerStack } from "./Indexer";
import { buildSecretsMap } from "./utils";
import { ApplicationProtocol } from "aws-cdk-lib/aws-elasticloadbalancingv2";

/**
* The CDK stack that will deploy the erpc service
Expand Down Expand Up @@ -112,18 +113,22 @@ export function ErpcStack({ app, stack }: StackContext) {
// Add the listener on port 8080 for the rpc
const httpListener = alb.addListener("ErpcHttpListener", {
port: 8080,
protocol: ApplicationProtocol.HTTP,
});
httpListener.addTargets("ErpcHttpTarget", {
port: 4000,
protocol: ApplicationProtocol.HTTP,
targets: [erpcFargateService],
});

// Add the metrics listener
const metricsListener = alb.addListener("ErpcMetricsListener", {
port: 8081,
protocol: ApplicationProtocol.HTTP,
});
metricsListener.addTargets("ErpcHttpTarget", {
port: 4001,
protocol: ApplicationProtocol.HTTP,
targets: [erpcFargateService],
});

Expand Down

0 comments on commit 095a97b

Please sign in to comment.