summaryrefslogtreecommitdiffhomepage
path: root/infra
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-12-11 00:11:40 -0500
committerDax Raad <[email protected]>2025-12-11 00:11:40 -0500
commit4309c078fb83e81859a2ba72003a3e0c75e0a7c5 (patch)
tree095e9c25e58b787b56be2cf9a0f353e4719abeb5 /infra
parentd14462f7a707fc0b6c5c75d99c40d2e5da358716 (diff)
downloadopencode-4309c078fb83e81859a2ba72003a3e0c75e0a7c5.tar.gz
opencode-4309c078fb83e81859a2ba72003a3e0c75e0a7c5.zip
domain
Diffstat (limited to 'infra')
-rw-r--r--infra/enterprise.ts5
-rw-r--r--infra/stage.ts6
2 files changed, 8 insertions, 3 deletions
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`
+})()