Skip to content

Commit 0da9dae

Browse files
AmanVarshney01ankur-archclaude
authored
feat(blog): add Prisma Compute posts (#7957)
* feat(blog): add Prisma Compute posts * docs(blog): simplify Compute agent prompt * docs(blog): clarify Compute config resolution * docs(blog): tighten Compute launch copy * docs(blog): condense Compute post copy * docs(blog): remove repeated create-prisma copy * docs(blog): make create-prisma post more concrete * docs(blog): add Compute terminal visuals * docs(blog): embed create-prisma terminal image * docs(blog): move terminal images to public assets * docs(blog): remove generated hero assets * blog(compute): clarify subtitles, join Compute series, add cross-links and CTAs - Sharpen section headings on both Compute posts - Date both to 2026-06-19; add create-prisma to the prisma-compute series (index 4), bump config-file to index 5 - Standardize on the "platform" tag and drop the unused "compute" enum value - Add product pointers (Compute/Postgres) and Discord CTA without selling Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * blog(compute): add excerpt to config-file post Avoids an empty lead paragraph (template renders page.data.excerpt directly). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * blog(compute): add config-tree hero/meta art to the config-file post Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * blog(compute): add scaffold cover art to the create-prisma post (hero + meta) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Ankur Datta <64993082+ankur-arch@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4b642d8 commit 0da9dae

7 files changed

Lines changed: 1249 additions & 0 deletions

File tree

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
title: "Deploy Prisma Apps with create-prisma"
3+
slug: "create-prisma-deploy-prisma-compute"
4+
date: "2026-06-19"
5+
authors:
6+
- "Aman Varshney"
7+
metaTitle: "Deploy Prisma Apps with create-prisma"
8+
metaDescription: "create-prisma now scaffolds Compute-ready Prisma apps with prisma.compute.ts, compute:deploy, Prisma Postgres, and Prisma Skills add-ons."
9+
heroImagePath: "/create-prisma-deploy-prisma-compute/imgs/hero.svg"
10+
heroImageAlt: "Scaffold a deploy-ready app with create-prisma: bun create prisma@latest, then choose a template, generate a typed config, and add Postgres and Skills."
11+
metaImagePath: "/create-prisma-deploy-prisma-compute/imgs/meta.png"
12+
excerpt: "create-prisma now scaffolds Compute-ready Prisma apps with prisma.compute.ts, compute:deploy, Prisma Postgres, and Prisma Skills add-ons."
13+
series: prisma-compute
14+
seriesIndex: 4
15+
tags:
16+
- "announcement"
17+
- "platform"
18+
- "prisma-postgres"
19+
---
20+
21+
`create-prisma` now scaffolds apps that deploy to [Prisma Compute](/blog/launching-prisma-compute-public-beta) out of the box.
22+
23+
Run the initializer, pick a Compute-ready template, and the generated project can include:
24+
25+
- Prisma schema, client helper, seed file, database scripts, and env file
26+
- `prisma.compute.ts` with the app's Compute defaults
27+
- Prisma Postgres setup, when selected
28+
- Prisma Skills, the Prisma MCP server, and editor add-ons, when selected
29+
- a `compute:deploy` script for later deploys
30+
31+
```bash
32+
bun create prisma@latest
33+
```
34+
35+
![Terminal output from create-prisma showing Prisma Compute setup](/create-prisma-deploy-prisma-compute/imgs/create-prisma-terminal.png)
36+
37+
## The deploy config it writes for you
38+
39+
For Compute-ready templates, the scaffold and the deploy defaults live in the same repo. The generated env file, app name, port, and framework drive the first deploy and every redeploy after it.
40+
41+
For a Hono app, `create-prisma` writes a config like this:
42+
43+
```typescript
44+
import { defineComputeConfig } from "@prisma/compute-sdk/config";
45+
46+
export default defineComputeConfig({
47+
app: {
48+
name: "my-api",
49+
framework: "hono",
50+
httpPort: 8080,
51+
env: ".env",
52+
},
53+
});
54+
```
55+
56+
That file is the whole deploy contract. For a closer look at it, including how it scales to monorepos, see [Configure Prisma Compute deploys in TypeScript](/blog/prisma-compute-config-file).
57+
58+
## Add-ons that set your agent up
59+
60+
The add-ons are optional, but the Skills add-on changes how an agent works with the repo. It installs Prisma Agent Skills from [`prisma/skills`](https://github.com/prisma/skills), including the `prisma-compute` skill for deploys, logs, domains, and the rest of the Compute workflow.
61+
62+
With that in place, your agent already knows how to change the app and redeploy it. You don't have to spell out the steps in every prompt.
63+
64+
## Redeploying after a change
65+
66+
A project created with `create-prisma` ships with `prisma.compute.ts` and a `compute:deploy` script.
67+
68+
After you make a change, redeploy from the project:
69+
70+
```bash
71+
cd my-api
72+
bun run compute:deploy
73+
```
74+
75+
The script redeploys your app code using the defaults in `prisma.compute.ts`. Database provisioning and migrations stay outside the deploy script.
76+
77+
For an app you didn't scaffold, call the Prisma CLI directly:
78+
79+
```bash
80+
bunx @prisma/cli@latest app deploy
81+
```
82+
83+
## Where to go next
84+
85+
`create-prisma` gets you from nothing to a deployed app and database in one command, with the config already wired up. From here:
86+
87+
- Read [Configure Prisma Compute deploys in TypeScript](/blog/prisma-compute-config-file) to understand `prisma.compute.ts` and monorepo deploys in depth.
88+
- Follow the [deploy quickstart](https://docs.prisma.io/docs/prisma-compute/deploy) to take the generated app to a live URL.
89+
- Browse the [Prisma Compute docs](https://docs.prisma.io/docs/compute) for branching, environment variables, and the full CLI reference.
90+
91+
Compute is in [public beta](https://docs.prisma.io/docs/compute) and free while the beta lasts. It runs your app on the same infrastructure as [Prisma Postgres](https://www.prisma.io/postgres), which has a generous free tier of its own, so the project you scaffold today already has somewhere to run. Tell us what you build in [#prisma-compute](https://pris.ly/discord-compute) on Discord.
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
title: "Configure Prisma Compute deploys in TypeScript"
3+
slug: "prisma-compute-config-file"
4+
date: "2026-06-19"
5+
authors:
6+
- "Aman Varshney"
7+
metaTitle: "Configure Prisma Compute deploys in TypeScript"
8+
metaDescription: "Prisma Compute now reads a typed TypeScript config file, so deploys are reproducible and monorepos work: declare one app or several, then ship the whole system with one command."
9+
heroImagePath: "/prisma-compute-config-file/imgs/hero.svg"
10+
heroImageAlt: "One typed file for every app target: a prisma.compute.ts declaring an api app on Hono and a web app on Next.js"
11+
metaImagePath: "/prisma-compute-config-file/imgs/meta.png"
12+
excerpt: "Prisma Compute now reads a typed prisma.compute.ts, so deploys are reproducible and monorepos work: declare one app or several, then ship the whole system with one command."
13+
series: prisma-compute
14+
seriesIndex: 5
15+
tags:
16+
- "announcement"
17+
- "platform"
18+
---
19+
20+
[Prisma Compute](https://docs.prisma.io/docs/compute) can deploy a TypeScript app without config: `app deploy` detects the framework, builds the app, and returns a live URL.
21+
22+
For repeatable deploys and monorepos, Compute now reads `prisma.compute.ts`: a typed, committed config file for app targets and deploy defaults.
23+
24+
## One file, fully typed
25+
26+
Here is the smallest useful config for a single app:
27+
28+
```ts title="prisma.compute.ts"
29+
import { defineComputeConfig } from "@prisma/compute-sdk/config";
30+
31+
export default defineComputeConfig({
32+
app: {
33+
framework: "hono",
34+
entry: "src/index.ts",
35+
httpPort: 8080,
36+
},
37+
});
38+
```
39+
40+
Fields you set become defaults for `app deploy`; explicit flags still override them.
41+
42+
`defineComputeConfig` gives the file editor validation:
43+
44+
```ts title="prisma.compute.ts"
45+
export default defineComputeConfig({
46+
app: {
47+
framework: "hono",
48+
htpPort: 8080, // Type error: did you mean httpPort?
49+
},
50+
});
51+
```
52+
53+
The CLI resolves that import when it reads the file, so deploys work without a local install. Add `@prisma/compute-sdk` as a dev dependency for editor types.
54+
55+
## Declare every app in a monorepo
56+
57+
For a multi-app repo, use `apps` and key each deploy target by name:
58+
59+
```ts title="prisma.compute.ts"
60+
import { defineComputeConfig } from "@prisma/compute-sdk/config";
61+
62+
export default defineComputeConfig({
63+
apps: {
64+
api: {
65+
root: "apps/api",
66+
framework: "hono",
67+
entry: "src/index.ts",
68+
},
69+
web: {
70+
root: "apps/web",
71+
framework: "nextjs",
72+
},
73+
},
74+
});
75+
```
76+
77+
A bare `app deploy` deploys every app in declaration order:
78+
79+
```bash
80+
bunx @prisma/cli@latest app deploy
81+
```
82+
83+
The output stays grouped by target:
84+
85+
```bash
86+
$ bunx @prisma/cli@latest app deploy
87+
88+
── api (1/2) ──
89+
Built 0.1 MB
90+
Live in 5.9s
91+
https://api.fra.prisma.build
92+
93+
── web (2/2) ──
94+
Built 15.3 MB
95+
Live in 16.7s
96+
https://web.fra.prisma.build
97+
98+
api https://api.fra.prisma.build
99+
web https://web.fra.prisma.build
100+
```
101+
102+
To deploy one app, name its target or run from inside its directory. The deepest matching `root` wins:
103+
104+
```bash
105+
bunx @prisma/cli@latest app deploy api
106+
# or
107+
cd apps/api && bunx @prisma/cli@latest app deploy
108+
```
109+
110+
Compute uses your workspace package manager, resolves framework binaries in the workspace, and packages each app's dependencies. Supported targets today include Next.js, Nuxt, Astro, Hono, TanStack Start, and plain Bun servers.
111+
112+
## Built for agents first
113+
114+
Agents are increasingly part of the deploy path. `prisma.compute.ts` keeps framework, port, env file, roots, and targets in the repo instead of only in a prompt.
115+
116+
Install the Compute-specific skill from `prisma/skills` alongside the repo:
117+
118+
```bash
119+
bunx skills add prisma/skills --skill prisma-compute
120+
```
121+
122+
Then the prompt can stay short:
123+
124+
```text
125+
Deploy this monorepo to Prisma Compute.
126+
```
127+
128+
The `prisma-compute` Agent Skill gives the agent the CLI workflow for deploys, logs, domains, and explicit target choices.
129+
130+
## What it does not do
131+
132+
The config declares app targets and deploy defaults. It does not select the Prisma project, branch, or production intent. Project context comes from explicit input, environment, or the local `.prisma/local.json` pin/cache. Branch context comes from explicit targeting, Git, or the `main` fallback.
133+
134+
Deploy output labels config-sourced settings as `set by prisma.compute.ts`.
135+
136+
## A step toward one Prisma config
137+
138+
`prisma.compute.ts` is deliberately scoped, and temporary by design.
139+
140+
Prisma already ships `prisma.config.ts` for the ORM. The long-term plan is one config file for ORM, Postgres, and Compute, with Compute living under a `compute` key.
141+
142+
The shape you write today is intended to move there mechanically once the unified file is ready.
143+
144+
## Try it
145+
146+
Drop a `prisma.compute.ts` next to your app, or one at your monorepo root, and deploy:
147+
148+
```bash
149+
bunx @prisma/cli@latest app deploy
150+
```
151+
152+
Starting fresh? [`create-prisma`](/blog/create-prisma-deploy-prisma-compute) scaffolds a Compute-ready app with `prisma.compute.ts` already wired up.
153+
154+
For the full field reference, see the [configuration docs](https://docs.prisma.io/docs/compute/configuration). For everything else about deploying on Compute, start with the [quickstart](https://docs.prisma.io/docs/prisma-compute/deploy).
155+
156+
One config file is the point: the same repo describes your data with [Prisma Postgres](https://www.prisma.io/postgres), your app with [Prisma Compute](https://docs.prisma.io/docs/compute), and your deploys with `prisma.compute.ts`, so a person or an agent can reason about the whole system in one place. Compute is in public beta and free while the beta lasts. Tell us what you ship in [#prisma-compute](https://pris.ly/discord-compute) on Discord.
231 KB
Loading

β€Žapps/blog/public/create-prisma-deploy-prisma-compute/imgs/hero.svgβ€Ž

Lines changed: 498 additions & 0 deletions
Loading
2.61 MB
Loading

β€Žapps/blog/public/prisma-compute-config-file/imgs/hero.svgβ€Ž

Lines changed: 504 additions & 0 deletions
Loading
1.12 MB
Loading

0 commit comments

Comments
Β (0)