opencode_offline/infra/enterprise.ts

18 lines
600 B
TypeScript
Raw Normal View History

2025-11-24 03:36:25 +08:00
import { SECRET } from "./secret"
2025-12-11 13:11:40 +08:00
import { domain, shortDomain } from "./stage"
2025-11-24 03:28:10 +08:00
const storage = new sst.cloudflare.Bucket("EnterpriseStorage")
2025-12-11 13:23:06 +08:00
const teams = new sst.cloudflare.x.SolidStart("Teams", {
2025-12-11 13:11:40 +08:00
domain: shortDomain,
2025-11-24 03:56:06 +08:00
path: "packages/enterprise",
buildCommand: "bun run build:cloudflare",
2025-11-24 03:28:10 +08:00
environment: {
OPENCODE_STORAGE_ADAPTER: "r2",
OPENCODE_STORAGE_ACCOUNT_ID: sst.cloudflare.DEFAULT_ACCOUNT_ID,
2025-11-24 03:36:25 +08:00
OPENCODE_STORAGE_ACCESS_KEY_ID: SECRET.R2AccessKey.value,
OPENCODE_STORAGE_SECRET_ACCESS_KEY: SECRET.R2SecretKey.value,
2025-11-24 03:28:10 +08:00
OPENCODE_STORAGE_BUCKET: storage.name,
},
})