diff --git a/iac/Indexer.ts b/iac/Indexer.ts index a5e0e3f..33a8f76 100644 --- a/iac/Indexer.ts +++ b/iac/Indexer.ts @@ -15,7 +15,7 @@ import { Cluster, type ICluster } from "aws-cdk-lib/aws-ecs"; import { ApplicationLoadBalancer, ApplicationProtocol, - ListenerAction, + ListenerCondition, } from "aws-cdk-lib/aws-elasticloadbalancingv2"; import { Duration } from "aws-cdk-lib/core"; import { @@ -87,15 +87,15 @@ export function IndexerStack({ app, stack }: StackContext) { unhealthyThresholdCount: 5, healthyHttpCodes: "200-299", }, + priority: 20, }); indexerListener.connections.allowInternally(Port.tcp(80)); // todo: add erpc service to the ALB // Add the listener on port 8080 for the rpc const erpcListener = alb.addListener("ErpcListener", { - port: 8080, + port: 81, protocol: ApplicationProtocol.HTTP, - defaultAction: ListenerAction.fixedResponse(404), }); erpcListener.addTargets("ErpcTarget", { port: 8080, @@ -110,6 +110,8 @@ export function IndexerStack({ app, stack }: StackContext) { unhealthyThresholdCount: 5, healthyHttpCodes: "200", }, + //conditions: [ListenerCondition.pathPatterns(["/main-rpc/*"])], + priority: 10, }); erpcListener.connections.allowInternally(Port.tcp(4001)); erpcListener.connections.allowInternally(Port.tcp(8080)); diff --git a/packages/erpc/erpc.yaml b/packages/erpc/erpc.yaml index 435e47b..ab95a42 100644 --- a/packages/erpc/erpc.yaml +++ b/packages/erpc/erpc.yaml @@ -14,7 +14,7 @@ metrics: host: 0.0.0.0 port: 4001 projects: - - id: main + - id: main-rpc networks: # Arb sepolia - architecture: evm