Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

On this pageOverview

Deployments

A deploy produces a version of a service: one built artifact that can serve traffic. Versions live inside a branch, and the live version is the one currently serving requests.

Versions are created three ways:

  • A git push. After you set up deploy on push, your repository's GitHub Actions workflow builds and deploys each pushed branch: the default Git branch deploys to production, and every other branch gets an isolated preview.
  • The Console. Trigger a build and deploy from the browser.
  • deploy. For a Prisma Composer app, deploy assembles the services you have already built and provisions them from your terminal or CI.

The service commands below manage the versions those flows create. They are targeted explicitly: the service is the first positional argument, and version-scoped commands take a globally unique version id, so there is no interactive picker and no dependence on your current git branch.

bunx prisma service show web

bunx prisma service open web

bunx prisma service version list web

bunx prisma service version show ver_123
Bash
pnpm prisma service show web
pnpm prisma service open web
pnpm prisma service version list web
pnpm prisma service version show ver_123
Bash
yarn prisma service show web
yarn prisma service open web
yarn prisma service version list web
yarn prisma service version show ver_123
Bash
npx prisma service show web
npx prisma service open web
npx prisma service version list web
npx prisma service version show ver_123

service show describes the service and its live version, service open opens its URL, version list lists the version history, and version show shows one version in detail.

service show describes the service and its live version, service open opens its URL, version list lists the version history, and version show shows one version in detail.

Read a version's logs with service logs. It defaults to the live version; --version-id <id> selects another:

bunx prisma service logs web --follow

bunx prisma service logs web --version-id ver_123 --tail 200
Bash
pnpm prisma service logs web --follow
pnpm prisma service logs web --version-id ver_123 --tail 200
Bash
yarn prisma service logs web --follow
yarn prisma service logs web --version-id ver_123 --tail 200
Bash
npx prisma service logs web --follow
npx prisma service logs web --version-id ver_123 --tail 200

Build output for a deploy is available in the Console alongside the version it produced.

Build output for a deploy is available in the Console alongside the version it produced.

Promote a preview version to production:

bunx prisma service version promote ver_123
Bash
pnpm prisma service version promote ver_123
Bash
yarn prisma service version promote ver_123
Bash
npx prisma service version promote ver_123

Promotion rebuilds the version with production environment variables and makes the result live behind the service's endpoint. The rebuild is what lets a version built for a preview branch pick up production environment variables on its way to production.

Roll back production to a previous version. Rollback reuses an existing build, so there is no rebuild step between you and a known-good state:

Promotion rebuilds the version with production environment variables and makes the result live behind the service's endpoint. The rebuild is what lets a version built for a preview branch pick up production environment variables on its way to production.

Roll back production to a previous version. Rollback reuses an existing build, so there is no rebuild step between you and a known-good state:

title="bun"
bunx prisma service version rollback web

bunx prisma service version rollback web --to ver_123
pnpm
pnpm prisma service version rollback web
pnpm prisma service version rollback web --to ver_123
yarn
yarn prisma service version rollback web
yarn prisma service version rollback web --to ver_123
npm
npx prisma service version rollback web
npx prisma service version rollback web --to ver_123

Without --to, rollback targets the version before the live one.

bunx prisma service version stop ver_123

bunx prisma service version start ver_123

bunx prisma service version delete ver_123
Bash
pnpm prisma service version stop ver_123
pnpm prisma service version start ver_123
pnpm prisma service version delete ver_123
Bash
yarn prisma service version stop ver_123
yarn prisma service version start ver_123
yarn prisma service version delete ver_123
Bash
npx prisma service version stop ver_123
npx prisma service version start ver_123
npx prisma service version delete ver_123

Stopping a version takes it out of service without deleting its artifact; starting it brings it back. Deleting a version permanently removes it and the artifact it holds, after confirmation.

Stopping a version takes it out of service without deleting its artifact; starting it brings it back. Deleting a version permanently removes it and the artifact it holds, after confirmation.

bunx prisma service delete web
Bash
pnpm prisma service delete web
Bash
yarn prisma service delete web
Bash
npx prisma service delete web

This permanently deletes the service from the branch you target with --branch. Pass --yes to skip the confirmation prompt.

This permanently deletes the service from the branch you target with --branch. Pass --yes to skip the confirmation prompt.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu