Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ba3fb61
docs(compute): add Deploy Button page and generator
ankur-arch Jul 29, 2026
7dc58b6
docs(compute): make the Deploy Button repository-first
ankur-arch Jul 30, 2026
8619b8b
fix(docs): correct Deploy Button contract details from Console audit
ankur-arch Jul 30, 2026
23cf20d
Merge branch 'main' into feat/compute-deploy-button-docs
ankur-arch Jul 31, 2026
0625347
docs(compute): env-var support in the Deploy Button page and generator
ankur-arch Jul 31, 2026
df0b1fb
docs(compute): document compute-config env vars; validate examples li…
ankur-arch Aug 4, 2026
f6d84c6
Merge branch 'main' into feat/compute-deploy-button-docs
ankur-arch Aug 4, 2026
8b02f01
docs(compute): lead the Deploy Button page with the generator; harden…
ankur-arch Aug 5, 2026
fcc69ac
docs(compute): state that the Deploy Button requires the JSON config …
ankur-arch Aug 13, 2026
0f11872
Merge remote-tracking branch 'origin/main' into feat/compute-deploy-b…
ankur-arch Aug 13, 2026
6701bb4
docs(compute): deploy-button review fixes
ankur-arch Aug 13, 2026
888e010
docs(compute): note that env var names can't start with a number
ankur-arch Aug 14, 2026
3f17b64
fix(docs): align deploy button with Composer (#8163)
AmanVarshney01 Aug 24, 2026
1d3d943
Merge remote-tracking branch 'origin/main' into feat/compute-deploy-b…
AmanVarshney01 Aug 24, 2026
e2c6573
docs(compute): remove stale Composer access warning
AmanVarshney01 Aug 24, 2026
96a432a
docs(compute): focus Deploy Button guide on users
AmanVarshney01 Aug 24, 2026
c701e3b
docs(compute): clarify Deploy Button user flow
AmanVarshney01 Aug 24, 2026
83a9209
docs(compute): update Deploy Button branding
AmanVarshney01 Aug 24, 2026
3c04867
docs(compute): balance Deploy Button spacing
AmanVarshney01 Aug 24, 2026
24a669c
Merge branch 'main' into feat/compute-deploy-button-docs
AmanVarshney01 Aug 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 152 additions & 0 deletions apps/docs/content/docs/compute/deploy-button.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
---
title: Deploy Button
description: Add a Deploy with Prisma button to your repository. One click copies your project into the user's GitHub account, provisions a Prisma Postgres database, and deploys it on Prisma Compute.
url: /compute/deploy-button
metaTitle: Deploy Button | Prisma Compute
metaDescription: Let anyone deploy your TypeScript project in one click. The Deploy with Prisma button clones your public GitHub repository, provisions Prisma Postgres, and deploys on Prisma Compute.
---

The Deploy Button lets anyone deploy your project in one click. Clicking it opens the Prisma Console, which copies your public GitHub repository into a new repository the user owns, creates a project with a [Prisma Postgres](/postgres) database, and starts the first deployment on [Prisma Compute](/compute). Add it to your README, a blog post, or your own site:

<a href="https://console.prisma.io/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fprisma%2Fcompute-deploy-example&utm_source=docs">
<img
src="/docs/img/deploy-button.svg"
alt="Deploy with Prisma"
width="172"
height="36"
/>
</a>

## Create your button

Enter your repository URL and copy the generated snippet:

<DeployButtonGenerator />

Before the button works, your repository needs to meet the [contract below](#make-your-repository-deployable). For every parameter the link can carry, see [URL format](#url-format).

## Make your repository deployable

Any public GitHub repository deploys when it meets this contract:

- **Public GitHub repository.** The button deploys the default branch. Private repository support is planned.
- **A `prisma.compute.json` file at the repository root.** The same configuration Prisma Compute reads for any connected repository: it names the app and sets its HTTP port. It must describe a single app and must not set a `region`, because the person deploying picks the region for both the database and the app. The file must use the JSON form with exactly this name — connected repositories also accept a typed `prisma.compute.ts`, but the Deploy Button does not yet. See [configuration](/compute/configuration).
- **A JavaScript or TypeScript project** with a `package.json` and a lockfile (`bun.lock`, `package-lock.json`, `pnpm-lock.yaml`, or `yarn.lock`) at the root.
- **A runnable app.** It must build and start under the normal Compute build, listen on the `httpPort` declared in `prisma.compute.json`, and declare anything it needs beyond `DATABASE_URL` as [required environment variables](#environment-variables) on the button link.

A minimal `prisma.compute.json`:

```json
{
"app": {
"name": "my-app",
"framework": "hono",
"entry": "src/index.ts",
"httpPort": 3000
}
}
```

`framework` and `entry` tell Compute how to build and start the app. You can omit them — Compute then detects the framework from your dependencies — but setting them makes deploys predictable. The full key reference is on the [configuration](/compute/configuration) page. You can also generate this file by running `npx -y @prisma/cli@next init --config-format json` in your project.

The repository is validated before it is copied. Validation rejects repositories with more than 100 files, a file over 5 MB, more than 25 MB in total, GitHub Actions workflows, symlinks, or Git submodules.

There is no registration, API key, or approval process. A minimal working example you can copy is [`prisma/compute-deploy-example`](https://github.com/prisma/compute-deploy-example), whose README carries its own Deploy Button.

## URL format

A Deploy Button is a link to:

```text
https://console.prisma.io/new/clone?repository-url=<your repository URL>
```

| Parameter | Required | Description |
| -------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `repository-url` | Yes | The public GitHub repository to deploy, in the form `https://github.com/owner/repo`. URL-encode it when composing the link. |
| `project-name` | No | Prefills the name of the repository the user creates (they can change it). Defaults to your repository's name. |
| `env` | No | Comma-separated names of environment variables your app requires, for example `env=OPENAI_API_KEY,RESEND_API_KEY`. Up to 10 names of uppercase letters, numbers, and underscores, not starting with a number. Never put values in the URL. |
| `env-example-<NAME>` | No | A non-secret example value that prefills the input for `<NAME>`, for example `env-example-RESEND_API_KEY=re_example_123`. Only use placeholder values that are safe to publish. |
| `utm_source` | No | Attribution for where the click came from, for example `github-readme`. This is the value Prisma's own funnel reporting records. |
| `utm_medium` | No | Attribution for the kind of placement, for example `button`. Carried on the link for your own analytics. |
| `utm_campaign` | No | Attribution for a specific campaign or launch. Carried on the link for your own analytics. |

A complete Markdown example for a README:

```md
[![Deploy with Prisma](https://www.prisma.io/docs/img/deploy-button.svg)](https://console.prisma.io/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Facme%2Fshop-api&utm_source=github-readme)
```

The same button in HTML:

```html
<a
href="https://console.prisma.io/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Facme%2Fshop-api&amp;utm_source=github-readme"
>
<img
src="https://www.prisma.io/docs/img/deploy-button.svg"
alt="Deploy with Prisma"
width="172"
height="36"
/>
</a>
```

## Environment variables

`DATABASE_URL` never needs to be configured: it is provisioned and wired automatically. If your app needs anything else, declare the variable names on the button link:

```text
https://console.prisma.io/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Facme%2Fshop-api&env=OPENAI_API_KEY,RESEND_API_KEY&env-example-RESEND_API_KEY=re_example_123
```

The Console prompts the user for a value for each declared variable before the deployment starts. The values are stored encrypted in the user's new project and applied to the first deployment, so the app boots fully configured. The user can change them later in the project's [environment variables](/compute/environment-variables) settings.

Two rules keep this safe:

- **The URL carries names and public example values, never secrets.** The user types each real value (or accepts your example) in the Console form. Real values never appear in the link, in browser history, or in the GitHub authorization round-trip — only the names and any `env-example` placeholders you chose to publish.
- **Examples must be safe to publish.** An `env-example-<NAME>` value appears in your README for anyone to read, so use obvious placeholders like `re_example_123`, never a real key.

If you list `DATABASE_URL` or `DATABASE_URL_POOLED` in `env`, the Console shows them as "Added automatically" instead of prompting, which is a useful way to signal that your app uses the database.

You can also declare variables in your repository instead of the link: entries under `app.env.vars` in `prisma.compute.json` show up in the deploy form automatically, with the committed value as the prefill. The snippet below shows only the `env` addition — merge it into your full config, which still needs `name` and `httpPort`.

```json
{
"app": {
"env": { "vars": { "RESEND_API_KEY": "re_example_123" } }
}
}
```

Variables from the URL come first and keep their examples; config entries are added after them. Since your repository is public, treat committed values like `env-example` values: placeholders only, never real keys.

## How it works

1. **Click the button.** The user lands on the clone page in the Prisma Console, which shows what will be deployed: your repository's name and, once a GitHub account is connected, the resolved commit, linked back to the source on GitHub. If they're signed out, they sign in first and return to the same page automatically.
2. **Choose where it goes.** They pick a workspace (when they have more than one), a GitHub account or organization, a name and visibility for their new repository (private by default), and a deployment region. If the button link declares [required environment variables](#environment-variables), the form prompts for their values here. If the Prisma GitHub App isn't installed yet, the flow walks them through installing it.
3. **Authorize once.** GitHub asks the user to authorize the repository creation. This authorization is used for that single deployment and is not stored.
4. **Prisma sets everything up.** Your code is copied, pinned to the default-branch commit resolved when they click Deploy, into a new repository under the user's account. A project with a Prisma Postgres database is provisioned, the database connection is configured automatically, and the first deployment starts.
5. **Push to deploy.** The new repository is connected to the project, so every later push deploys through the normal Git workflow.

The user owns the copy and the project. Prisma adds no credentials or platform files to the repository; database connection settings are managed in the Console, not committed to code.

The person clicking the button needs a [Prisma Data Platform account](https://pris.ly/pdp) (free to create during the flow), a GitHub account, and permission to create repositories under the selected account or organization. The flow walks them through anything missing, including installing the Prisma GitHub App.

## Troubleshooting

**"This repository cannot be deployed" with a message about `prisma.compute.json`.** The repository is missing the root configuration file. Add one; see [make your repository deployable](#make-your-repository-deployable).

**The clone page says the repository must be public.** The button only supports public source repositories today. The user's _copy_ can still be private; that's their choice in the deploy form.

**"The repository changed before Prisma could copy the template. Choose another repository name and try again."** The chosen name usually collides with a repository the user already has. Picking a different name in the form and deploying again resolves it.

**"This deploy link's environment variable list is not valid."** A name in the `env` parameter doesn't match the required shape. Names use uppercase letters, numbers, and underscores and can't start with a number (like `MY_API_KEY`), up to 10 per link. Regenerate the link with valid names.

**GitHub authorization was canceled or expired.** The authorization step must be completed within 15 minutes. Returning to the clone page and clicking Deploy again starts a fresh attempt.

**The GitHub account isn't listed.** The Prisma GitHub App isn't installed on that account or organization. The "Connect GitHub" option in the deploy form starts the installation; after completing it on GitHub, the user continues from the clone page.

**The repository was created, but the deployment didn't start.** Nothing is deleted on a partial failure. If the Prisma project was created and connected to the repository, pushing any commit to the new repository's default branch triggers a deployment through the normal Git flow. If the failure happened before the project existed, return to the clone page and deploy again with a different repository name. See [deployments](/compute/deployments).

**The app deployed but shows an error page.** Check the build and runtime logs on the project's deployment page, confirm the database finished provisioning in the Console, and verify the app listens on the port declared in `prisma.compute.json`. The [FAQ](/compute/faq) covers common runtime issues.
1 change: 1 addition & 0 deletions apps/docs/content/docs/compute/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"domains",
"---Integrations---",
"github",
"deploy-button",
"alchemy",
"---Reference---",
"configuration",
Expand Down
8 changes: 8 additions & 0 deletions apps/docs/public/img/deploy-button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading