enterprise.ts 610 B

123456789101112131415161718
  1. import { SECRET } from "./secret"
  2. import { shortDomain } from "./stage"
  3. const storage = new sst.cloudflare.Bucket("EnterpriseStorage")
  4. new sst.cloudflare.x.SolidStart("Teams", {
  5. domain: shortDomain,
  6. path: "packages/enterprise",
  7. buildCommand: "bun run build:cloudflare",
  8. link: [SECRET.SupportApiKey],
  9. environment: {
  10. OPENCODE_STORAGE_ADAPTER: "r2",
  11. OPENCODE_STORAGE_ACCOUNT_ID: sst.cloudflare.DEFAULT_ACCOUNT_ID,
  12. OPENCODE_STORAGE_ACCESS_KEY_ID: SECRET.R2AccessKey.value,
  13. OPENCODE_STORAGE_SECRET_ACCESS_KEY: SECRET.R2SecretKey.value,
  14. OPENCODE_STORAGE_BUCKET: storage.name,
  15. },
  16. })