cloudaxe-opencode/infra/stage.ts

41 lines
1.1 KiB
TypeScript
Raw Permalink Normal View History

2025-08-08 17:22:54 +00:00
export const domain = (() => {
if ($app.stage === "production") return "opencode.ai"
if ($app.stage === "dev") return "dev.opencode.ai"
return `${$app.stage}.dev.opencode.ai`
})()
2025-09-27 05:28:11 +00:00
export const zoneID = "430ba34c138cfb5360826c4909f99be8"
2026-05-25 23:14:39 +00:00
export const awsStage = $app.stage === "production" ? "production" : "dev"
2026-05-27 11:17:16 +00:00
export const deployAws = $app.stage === awsStage
if ($app.stage === "production") {
new cloudflare.DnsRecord("TrustCenter", {
zoneId: zoneID,
name: "trust.opencode.ai",
type: "CNAME",
content: "3a69a5bb27875189.vercel-dns-016.com",
proxied: false,
ttl: 60,
})
new cloudflare.DnsRecord("TrustCenterVerification", {
zoneId: zoneID,
name: "opencode.ai",
type: "TXT",
content: "compai-domain-verification=org_6993a99c6200a2d642bb115d",
ttl: 60,
})
}
2025-10-03 23:05:32 +00:00
new cloudflare.RegionalHostname("RegionalHostname", {
hostname: domain,
regionKey: "us",
zoneId: zoneID,
})
2025-12-11 05:11:40 +00:00
export const shortDomain = (() => {
if ($app.stage === "production") return "opncd.ai"
if ($app.stage === "dev") return "dev.opncd.ai"
return `${$app.stage}.dev.opncd.ai`
})()