Skip to content

Commit

Permalink
🐛 Remove erpc from dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Dec 17, 2024
1 parent 9294788 commit 1729afe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion infra/erpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { cluster, vpc } from "./common.ts";
import { ServiceTargets } from "./components/ServiceTargets.ts";
import { SstService } from "./utils.ts";

if ($app.stage !== "production") {
throw new Error("eRPC is reserved for production usage");
}

// Get the image we will deploy
const image = await aws.ecr.getImage({
repositoryName: "erpc",
Expand All @@ -13,7 +17,7 @@ const image = await aws.ecr.getImage({
// Create the service targets
const erpcServiceTargets = new ServiceTargets("ErpcServiceDomain", {
vpcId: vpc.id,
domain: $app.stage === "production" ? "rpc.frak.id" : "rpc-dev.frak.id",
domain: "rpc.frak.id",
ports: [
{ listen: "80/http", forward: "8080/http" },
{ listen: "443/https", forward: "8080/http" },
Expand Down
5 changes: 2 additions & 3 deletions sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ export default $config({
async run() {
await import("./infra/common.ts");

await import("./infra/erpc.ts");

if ($app.stage === "production") {
// Ponder deployment on prod
// ERPC + ponder deployment on prod
await import("./infra/erpc.ts");
await import("./infra/ponder.prod.ts");
} else {
// Only ponder on dev
Expand Down

0 comments on commit 1729afe

Please sign in to comment.