summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bun.lock1
-rw-r--r--infra/enterprise.ts30
-rw-r--r--packages/enterprise/package.json1
-rw-r--r--packages/enterprise/tsconfig.json2
-rw-r--r--sst.config.ts2
5 files changed, 34 insertions, 2 deletions
diff --git a/bun.lock b/bun.lock
index 2038ac830..6bb1b73d4 100644
--- a/bun.lock
+++ b/bun.lock
@@ -177,6 +177,7 @@
"zod": "catalog:",
},
"devDependencies": {
+ "@cloudflare/workers-types": "catalog:",
"@tailwindcss/vite": "catalog:",
"@types/luxon": "catalog:",
"@typescript/native-preview": "catalog:",
diff --git a/infra/enterprise.ts b/infra/enterprise.ts
new file mode 100644
index 000000000..677c8e412
--- /dev/null
+++ b/infra/enterprise.ts
@@ -0,0 +1,30 @@
+import { domain } from "./stage"
+
+const storage = new sst.cloudflare.Bucket("EnterpriseStorage")
+const token = new cloudflare.ApiToken("EnterpriseStorageToken", {
+ name: `${$app.name}-${$app.stage}-enterprise-storage`,
+ policies: [
+ {
+ effect: "allow",
+ resources: {
+ "com.cloudflare.api.account.*": "*",
+ },
+ permissionGroups: [
+ {
+ id: "c8d07a38f1654800b34e33e59b4e8f41",
+ },
+ ],
+ },
+ ],
+})
+
+const enterprise = new sst.cloudflare.x.SolidStart("Enterprise", {
+ domain: "enterprise." + domain,
+ environment: {
+ OPENCODE_STORAGE_ADAPTER: "r2",
+ OPENCODE_STORAGE_ACCOUNT_ID: sst.cloudflare.DEFAULT_ACCOUNT_ID,
+ OPENCODE_STORAGE_ACCESS_KEY_ID: "---",
+ OPENCODE_STORAGE_SECRET_ACCESS_KEY: "---",
+ OPENCODE_STORAGE_BUCKET: storage.name,
+ },
+})
diff --git a/packages/enterprise/package.json b/packages/enterprise/package.json
index 985ed203b..78d61aeee 100644
--- a/packages/enterprise/package.json
+++ b/packages/enterprise/package.json
@@ -24,6 +24,7 @@
"zod": "catalog:"
},
"devDependencies": {
+ "@cloudflare/workers-types": "catalog:",
"@tailwindcss/vite": "catalog:",
"@typescript/native-preview": "catalog:",
"@types/luxon": "catalog:",
diff --git a/packages/enterprise/tsconfig.json b/packages/enterprise/tsconfig.json
index 6bdc0f9ee..af4ce1649 100644
--- a/packages/enterprise/tsconfig.json
+++ b/packages/enterprise/tsconfig.json
@@ -11,7 +11,7 @@
"allowJs": true,
"noEmit": true,
"strict": true,
- "types": ["vite/client"],
+ "types": ["@cloudflare/workers-types", "vite/client"],
"isolatedModules": true,
"paths": {
"~/*": ["./src/*"]
diff --git a/sst.config.ts b/sst.config.ts
index a18787391..1698721ce 100644
--- a/sst.config.ts
+++ b/sst.config.ts
@@ -9,7 +9,7 @@ export default $config({
home: "cloudflare",
providers: {
stripe: {
- apiKey: process.env.STRIPE_SECRET_KEY,
+ apiKey: process.env.STRIPE_SECRET_KEY!,
},
planetscale: "0.4.1",
},