Skip to content

Commit 9df504d

Browse files
docs(compute): centralize monorepo guidance
1 parent d7db5dc commit 9df504d

6 files changed

Lines changed: 12 additions & 61 deletions

File tree

apps/docs/content/docs/(index)/prisma-compute/deploy.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Make sure your project directory is a Git repository with a GitHub remote, then
156156
npx @prisma/cli@latest git connect
157157
```
158158

159-
`git connect` wires up the project this directory is linked to, which exists once you have deployed at least once. For monorepos and CI, see the [GitHub integration docs](/compute/github).
159+
`git connect` wires up the project this directory is linked to, which exists once you have deployed at least once. For a repository with several apps, see [Deploy a monorepo](/compute/monorepos). For integration details, see the [GitHub docs](/compute/github).
160160

161161
## Hand it to your agent
162162

@@ -185,5 +185,6 @@ Notes for your agent:
185185
- [Branching](/compute/branching): how preview branches isolate work and map to your Git branches.
186186
- [Add environment variables](/compute/environment-variables) for configuration, secrets, and your database connection string.
187187
- [Deployments](/compute/deployments): promote, roll back, and inspect what you ship.
188-
- [GitHub integration](/compute/github): the full picture on deploy-on-push, monorepos, and cleanup.
188+
- [Deploy a monorepo](/compute/monorepos): configure, verify, and deploy several apps from one repository.
189+
- [GitHub integration](/compute/github): the full picture on deploy-on-push and cleanup.
189190
- [Read the full CLI getting-started guide](/compute/getting-started) for frameworks, project linking, and CI.

apps/docs/content/docs/compute/cli-reference.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Manage apps and deployments for a project.
6161
| `app rollback` | Roll back production to the previous deployment, without rebuilding |
6262
| `app remove` | Remove the app from the current branch |
6363

64-
Promote and rollback switch the live endpoint between existing deployments; nothing is rebuilt, and env vars stay as resolved when each deployment was created. Most `app` commands also accept an optional `[app]` positional argument to pick a target from `prisma.compute.ts` when the config defines multiple apps.
64+
Promote and rollback switch the live endpoint between existing deployments; nothing is rebuilt, and env vars stay as resolved when each deployment was created. Most `app` commands also accept an optional `[app]` positional argument to pick a target from `prisma.compute.ts` when the config defines multiple apps. See [Deploy a monorepo](/compute/monorepos) for target setup and workflows.
6565

6666
### `app deploy` options
6767

apps/docs/content/docs/compute/configuration.mdx

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metaDescription: "Reference for the prisma.compute.ts file: declare your app's f
99
`prisma.compute.ts` is an optional, committed file that declares what you deploy. [`app deploy`](/compute/cli-reference#app) already works with zero config (it detects your framework and builds), so reach for a config file when you want one of these:
1010

1111
- **Reproducible deploys.** Pin the framework, port, and build settings so every deploy (yours, a teammate's, or [deploy-on-push](/compute/github)) does the same thing without re-passing flags.
12-
- **A monorepo.** Declare several apps in one repository and deploy them together, or one at a time.
12+
- **A monorepo.** [Declare several apps](/compute/monorepos) in one repository and deploy them together, or one at a time.
1313
- **Type safety.** Catch a typo'd field or an invalid framework in your editor, before you deploy.
1414

1515
The file is read by `app deploy` and `app build`. It never selects your project, branch, or production; those stay explicit. It also does not configure a database; that stays on the [`--db` flag](/compute/cli-reference#app-deploy-options).
@@ -143,47 +143,7 @@ The config file's directory is treated as the project directory: the [`.prisma/l
143143

144144
## Monorepos
145145

146-
Use `apps` instead of `app` to declare several apps in one repository, keyed by a target name. For an end-to-end setup with local builds, single-app deploys, deploy-all, and GitHub automation, see [Deploy a monorepo](/compute/monorepos).
147-
148-
```ts title="prisma.compute.ts"
149-
import { defineComputeConfig } from "@prisma/compute-sdk/config";
150-
151-
export default defineComputeConfig({
152-
apps: {
153-
api: {
154-
root: "apps/api",
155-
framework: "hono",
156-
entry: "src/index.ts",
157-
},
158-
web: {
159-
root: "apps/web",
160-
framework: "nextjs",
161-
},
162-
},
163-
});
164-
```
165-
166-
All the apps live in one project, deploying to the same branch. From here:
167-
168-
- **Deploy everything** with a bare `app deploy`, which deploys every app in order. This is the default when no target is named or inferred:
169-
170-
```npm
171-
npx @prisma/cli@latest app deploy
172-
```
173-
174-
- **Deploy one app** by naming its target, or by running from inside its `root` (the deepest matching root wins):
175-
176-
```npm
177-
npx @prisma/cli@latest app deploy api
178-
```
179-
180-
```npm
181-
cd apps/api && npx @prisma/cli@latest app deploy
182-
```
183-
184-
When you deploy everything at once, per-app flags like `--framework` or `--entry` are rejected as ambiguous. Pass a target to apply them to one app. Project- and branch-level flags (`--branch`, `--db`, `--prod`, `--yes`) apply to the whole run.
185-
186-
`app build` always targets a single app in a multi-app config. Unlike `deploy`, it has no all-apps form, so pass a target or run from inside the app's `root`.
146+
Use `apps` instead of `app` to declare several apps in one repository. Each map key is a CLI target, and every target accepts the same fields listed above. See [Deploy a monorepo](/compute/monorepos) for the complete config, directory layout, target selection, local builds, deploy-all behavior, and GitHub automation.
187147

188148
## How config and flags interact
189149

@@ -203,4 +163,4 @@ A config that fails to load or validate stops the deploy before any remote work,
203163
- [CLI reference](/compute/cli-reference): every command, flag, and error code.
204164
- [Deploy your first app](/prisma-compute/deploy): the end-to-end quickstart.
205165
- [Environment variables](/compute/environment-variables): scoped configuration, secrets, and your database connection string.
206-
- [GitHub integration](/compute/github): deploy-on-push, including monorepos.
166+
- [GitHub integration](/compute/github): deploy-on-push and branch previews.

apps/docs/content/docs/compute/faq.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ No. Variables resolve at deploy time, so you need to redeploy for the app to pic
5757

5858
## How do I deploy from CI?
5959

60-
Use a service token and explicit targets:
60+
Use a service token and name the remote project and app explicitly:
6161

6262
```bash
6363
PRISMA_SERVICE_TOKEN=... npx @prisma/cli@latest app deploy \
@@ -68,7 +68,7 @@ PRISMA_SERVICE_TOKEN=... npx @prisma/cli@latest app deploy \
6868
--no-interactive
6969
```
7070

71-
Passing every target explicitly keeps the run self-contained; `--json` makes the result parseable, and `--no-interactive` turns any would-be prompt into a structured error.
71+
Passing every selector explicitly keeps the run self-contained; `--json` makes the result parseable, and `--no-interactive` turns any would-be prompt into a structured error. For multiple config targets in one repository, follow [Deploy a monorepo](/compute/monorepos).
7272

7373
## Why did my production deploy fail with `PROD_DEPLOY_REQUIRES_FLAG`?
7474

apps/docs/content/docs/compute/github.mdx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,9 @@ Once a project is connected:
5656

5757
Connecting doesn't deploy anything on its own; it wires up automation for *future* events. To deploy right now, run `app deploy` yourself.
5858

59-
## CI and monorepos
59+
## Monorepos
6060

61-
Auto-deploy handles [monorepos that declare their apps in `prisma.compute.ts`](/compute/monorepos): one pushed commit fans out into a targeted build per app. For custom pipelines, or anywhere you want full control, set `PRISMA_SERVICE_TOKEN` and `PRISMA_PROJECT_ID`, then name the config target positionally:
62-
63-
```bash title="CI"
64-
PRISMA_SERVICE_TOKEN=... PRISMA_PROJECT_ID=... \
65-
npx @prisma/cli@latest app deploy web \
66-
--branch "${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}" \
67-
--json \
68-
--no-interactive
69-
```
70-
71-
This keeps deploys deterministic and gives agents a structured result to read.
61+
A connected repository can deploy several Compute apps from each push. See [Deploy a monorepo](/compute/monorepos) for the root `prisma.compute.ts` config, build fan-out, target selection, and custom CI commands.
7262

7363
## What's not in beta
7464

apps/docs/content/docs/compute/limitations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Prisma Compute is in [Public Beta](/console/more/feature-maturity#public-beta).
3838
## GitHub
3939

4040
- GitHub is the only supported provider, and a project connects to one repository.
41-
- Auto-deploy supports multiple apps declared in `prisma.compute.ts`: one push build fans out into a targeted build per app. CI with a service token remains available when you need full control.
41+
- Auto-deploy supports [multiple apps declared in a monorepo config](/compute/monorepos).
4242
- The webhook path is branch- and push-driven. There are no PR comments or PR status automation.
4343

4444
## Domains

0 commit comments

Comments
 (0)