Skip to content

Commit

Permalink
⚗️ Test erpc on same port as ponder
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Jul 30, 2024
1 parent 008a018 commit e92ab1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions iac/Indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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: 80,
protocol: ApplicationProtocol.HTTP,
defaultAction: ListenerAction.fixedResponse(404),
});
erpcListener.addTargets("ErpcTarget", {
port: 8080,
Expand All @@ -110,6 +110,7 @@ export function IndexerStack({ app, stack }: StackContext) {
unhealthyThresholdCount: 5,
healthyHttpCodes: "200",
},
conditions: [ListenerCondition.pathPatterns(["/main-rpc/*"])],
});
erpcListener.connections.allowInternally(Port.tcp(4001));
erpcListener.connections.allowInternally(Port.tcp(8080));
Expand Down
2 changes: 1 addition & 1 deletion packages/erpc/erpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metrics:
host: 0.0.0.0
port: 4001
projects:
- id: main
- id: main-rpc
networks:
# Arb sepolia
- architecture: evm
Expand Down

0 comments on commit e92ab1a

Please sign in to comment.