Deployments
Build, deploy, inspect, promote, and roll back app deployments on Prisma Compute.
A deployment is one built version of your app. Deployments live inside a branch, and the live deployment is the one currently serving traffic.
Deploy
From your app directory:
bunx @prisma/cli@latest app deployThe CLI resolves your project, branch, and app, builds the code, and returns a live URL. What it resolves:
- Project: from your linked directory, or
--project/--create-project. - Branch:
--branch, then your active Git branch, thenmain. - App:
--app, or inferred from yourpackage.jsonname or directory. If more than one app matches in non-interactive mode, the deploy fails withAPP_AMBIGUOUS; pass--app.
You can pass values straight into a deploy:
bunx @prisma/cli@latest app deploy --framework hono --entry src/index.ts --http-port 3000
bunx @prisma/cli@latest app deploy --env DATABASE_URL=postgresql://example--env is for one-off values at deploy time. For variables that should persist across deploys, set them on the project. To learn more, see the Environment variables docs.
Build and run locally
Check your app builds before you ship it:
bunx @prisma/cli@latest app build
bunx @prisma/cli@latest app run --port 3000app build supports the build types auto, bun, nextjs, nuxt, astro, and tanstack-start. app run currently supports auto, bun, and nextjs.
Deploy to production
Your first deployment is promoted to production automatically. After that, every production deploy needs an explicit --prod flag, so you don't ship to production by accident:
bunx @prisma/cli@latest app deploy --prodWithout --prod, a deploy that resolves to the production branch and already has a live production deployment fails with PROD_DEPLOY_REQUIRES_FLAG. With --prod, the CLI shows the current live deployment and asks you to confirm before replacing it.
For scripts and CI, pass both flags so nothing waits on a prompt:
bunx @prisma/cli@latest app deploy --prod --yesIn non-interactive mode, a --prod deploy without --yes fails with CONFIRMATION_REQUIRED. Preview deploys never need --prod and never ask.
Inspect deployments
bunx @prisma/cli@latest app show --app web
bunx @prisma/cli@latest app open --app web
bunx @prisma/cli@latest app list-deploys --app web
bunx @prisma/cli@latest app show-deploy dep_123app show describes the live app, app open opens its URL, app list-deploys lists the deployment history, and app show-deploy shows one deployment in detail.
Logs
Stream logs for the live deployment, or for a specific one:
bunx @prisma/cli@latest app logs --app web
bunx @prisma/cli@latest app logs --app web --deployment dep_123Your app's log lines go to stdout; the CLI's own status and errors go to stderr, so you can pipe them apart. If the platform can't serve logs for the resolved deployment, the command fails with FEATURE_UNAVAILABLE.
Promote and roll back
Promote an earlier deployment to production:
bunx @prisma/cli@latest app promote dep_123 --app webPromotion rebuilds the deployment with your production environment variables. The rebuild is necessary because values are baked in at deploy time: a preview build still carries preview config, so it can't serve production as-is.
Roll back to the previous deployment, or a specific one. Unlike promote, rollback reuses an existing build, so there is no rebuild step between you and a known-good state:
bunx @prisma/cli@latest app rollback --app web
bunx @prisma/cli@latest app rollback --app web --to dep_123If there's nothing to roll back to, you get NO_PREVIOUS_DEPLOYMENT.
Remove an app
bunx @prisma/cli@latest app remove --app webThis removes the app from the current branch. Pass --yes to skip the confirmation prompt.
Next steps
- Environment variables: persist config across deploys.
- GitHub integration: deploy on push instead of manually.
- Domains: point a custom domain at production.