feat(stats): route stats app

This commit is contained in:
Adam 2026-05-28 18:37:13 -05:00
commit 58da1ea48e
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
9 changed files with 62 additions and 16 deletions

View file

@ -1,4 +1,5 @@
import { lakeAthenaWorkgroup, lakeCatalog, lakeCluster, lakeQueryPermissions, lakeRegion, tableBucket } from "./lake"
import { EMAILOCTOPUS_API_KEY } from "./app"
const domain = (() => {
if ($app.stage === "production") return "stats.opencode.ai"
@ -163,15 +164,15 @@ new sst.x.DevCommand("StatsStudio", {
// APP
////////////////
// export const app = new sst.cloudflare.x.SolidStart("Stats", {
// path: "packages/stats/app",
// buildCommand: "bun run build",
// domain,
// link: [database],
// environment: {
// PUBLIC_URL: `https://${domain}`,
// },
// })
export const app = new sst.cloudflare.x.SolidStart("Stats", {
path: "packages/stats/app",
buildCommand: "bun run build",
domain,
link: [database, EMAILOCTOPUS_API_KEY],
environment: {
PUBLIC_URL: `https://${domain}/stats`,
},
})
////////////////
// SERVICES