From 4309c078fb83e81859a2ba72003a3e0c75e0a7c5 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Thu, 11 Dec 2025 00:11:40 -0500 Subject: domain --- infra/enterprise.ts | 5 ++--- infra/stage.ts | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'infra') diff --git a/infra/enterprise.ts b/infra/enterprise.ts index 316d6384d..e3b61c36d 100644 --- a/infra/enterprise.ts +++ b/infra/enterprise.ts @@ -1,14 +1,13 @@ import { SECRET } from "./secret" -import { domain } from "./stage" +import { domain, shortDomain } from "./stage" const storage = new sst.cloudflare.Bucket("EnterpriseStorage") const enterprise = new sst.cloudflare.x.SolidStart("Enterprise", { - domain: "enterprise." + domain, + domain: shortDomain, path: "packages/enterprise", buildCommand: "bun run build:cloudflare", environment: { - OPENCODE_BASE_URL: "/t", OPENCODE_STORAGE_ADAPTER: "r2", OPENCODE_STORAGE_ACCOUNT_ID: sst.cloudflare.DEFAULT_ACCOUNT_ID, OPENCODE_STORAGE_ACCESS_KEY_ID: SECRET.R2AccessKey.value, diff --git a/infra/stage.ts b/infra/stage.ts index 729422905..f9a6fd755 100644 --- a/infra/stage.ts +++ b/infra/stage.ts @@ -11,3 +11,9 @@ new cloudflare.RegionalHostname("RegionalHostname", { regionKey: "us", zoneId: zoneID, }) + +export const shortDomain = (() => { + if ($app.stage === "production") return "opncd.ai" + if ($app.stage === "dev") return "dev.opncd.ai" + return `${$app.stage}.dev.opncd.ai` +})() -- cgit v1.2.3