Apps
Prisma.Compute deploys an application onto Prisma’s managed
runtime. One resource covers the whole path: optional build, artifact
upload, deployment, health check, and promotion — see
Deployments for the lifecycle.
Framework apps
Section titled “Framework apps”Point path at the app. With build: "auto", alchemy detects the
framework, builds it, archives the output, and deploys the correct
server entrypoint:
const app = yield* Prisma.Compute("api", { project, path: "./app", build: "auto", healthCheck: { path: "/api/health" }, destroyOldDeployment: true,});The server must listen on PORT (injected at runtime). Auto-build
supports Bun, Next.js, Nuxt, Astro, TanStack Start, and NestJS. Use an
explicit build object when an app needs a custom command, output
directory, or entrypoint.
When Prisma.Project creates its default database, Prisma injects
system-managed DATABASE_URL and DATABASE_URL_POOLED values into
Compute deployments. Leave those keys out of env. For a standalone
Prisma.Postgres database, create a Prisma.Connection and pass its
outputs explicitly as shown in Connections.
app.url is the deployed endpoint.
Effect-native apps
Section titled “Effect-native apps”Pass main and an Effect body instead of a build, and the app is
bundled from your Stack file — same shape as an Effect-native
Cloudflare Worker or Lambda:
export default Prisma.Compute( "api", { project, main: import.meta.filename }, Effect.gen(function* () { const db = yield* Prisma.Connect(connection); const sql = yield* SQL.Postgres({ url: db.databaseUrl });
return { fetch: Effect.gen(function* () { const users = yield* sql`SELECT * FROM users`; return yield* HttpServerResponse.json(users); }), }; }).pipe(Effect.provide(Prisma.ConnectBinding)),);Custom domains
Section titled “Custom domains”Custom domains can only attach to an app on the project’s current
default branch. Creating the resource starts DNS and certificate
provisioning; use domain.dnsRecords to configure DNS and inspect
domain.status before directing production traffic:
const domain = yield* Prisma.CustomDomain("api-domain", { app, hostname: "api.example.com",});Changing the hostname or app in place is intentionally rejected. Create a second domain, verify DNS and TLS, cut traffic over, and then remove the old resource.
Local dev
Section titled “Local dev”Under bun alchemy dev, dev.command runs your app locally (e.g.
vite dev) with the same env the deployed app would see — including
connection bindings, which resolve to the local
dev database:
const app = yield* Prisma.Compute("web", { project, path: ".", dev: { command: "bun run dev" }, env: { DATABASE_URL: connection.databaseUrl },});Where next
Section titled “Where next”- Deployments — health-checked promotion, rollback, and deployment reuse.
- Connections — the env and binding wiring in detail.
Reference: