prisma-compute

软件研发 云服务与部署 11 文件 EN 原文

在 Prisma Compute 上部署和运维应用

Deploy and operate apps on Prisma Compute with the Prisma 8 CLI. Use whenever the user mentions Prisma Compute, deploying or hosting a Prisma app, `prisma deploy`, `prisma dev module.ts`, Prisma Composer apps (`module.ts`, `compute()`, the `composer` section of `prisma.config.ts`), preview stages, deploy on push (`prisma git connect`, `prisma/cloud-deploy-action`), `prisma service` logs, versions, rollback, or custom domains, `project env`, `PRISMA_SERVICE_TOKEN`, regions, 504s, sleeping instances, or `waitUntil`; also when a project still uses the removed `@prisma/cli app deploy`, `prisma.compute.ts`, `defineComputeConfig`, `compute:deploy`, or `build logs` surface.

说明语言:英文

来源prismaskills ↗ 查看原文件 ↗版权归原作者,请遵循原仓库许可
安装
npx skills add https://github.com/prisma/skills --skill prisma-compute

需要已安装 skills CLI。也可以直接从源仓库 clone。

在星云中查看 ↗
SKILL.md 原文

name: prisma-compute description: Deploy and operate apps on Prisma Compute with the Prisma 8 CLI. Use whenever the user mentions Prisma Compute, deploying or hosting a Prisma app, prisma deploy, prisma dev module.ts, Prisma Composer apps (module.ts, compute(), the composer section of prisma.config.ts), preview stages, deploy on push (prisma git connect, prisma/cloud-deploy-action), prisma service logs, versions, rollback, or custom domains, project env, PRISMA_SERVICE_TOKEN, regions, 504s, sleeping instances, or waitUntil; also when a project still uses the removed @prisma/cli app deploy, prisma.compute.ts, defineComputeConfig, compute:deploy, or build logs surface. license: MIT metadata: author: prisma version: "2.0.0" ---

Prisma Compute

Deploy TypeScript apps to Prisma Compute and operate them afterwards. Every deploy goes through a Prisma Composer app (a module.ts root module) and the Prisma 8 CLI, prisma.

Verified against prisma 8.0.0-rc.21 (published identically as @prisma/cli), @prisma/composer and @prisma/composer-prisma-cloud 0.28.0, @prisma/compute 0.1.0-beta.0, and create-prisma 0.14.1. Re-checked against prisma 8.0.0-rc.23, whose command surface matches rc.21, and Composer 0.30.0, which adds node()'s dependencies option (0.29.0) and narrows the supported Node.js versions. The CLI moves fast: run npx prisma <group> --help before using a flag this skill does not show.

Version-Matched Skills

The installed packages ship their own agent skills, matched to the installed version:

npx prisma skills sync copies them into the agent skill directories (.claude/skills, .cursor/skills, .agents/skills, .devin/skills), and npx prisma skills list shows what is installed. npx prisma init does the same and adds a postinstall hook that keeps them current. When those skills are installed, use them for API details. This skill covers the deploy and operations workflow and its pitfalls.

Removed Surface

The Compute CLI from before Composer is gone. Its commands fail with CLI.UNKNOWN_COMMAND (removed flags with CLI.INVALID_ARGUMENTS), its config files are not read, and its environment variables are ignored:

RemovedUse instead
@prisma/cli app deploy, app build, app runYour own build script, then npx prisma deploy module.ts; npx prisma dev module.ts to run locally
prisma.compute.ts, prisma.compute.json, defineComputeConfigmodule.ts, a service.ts per server declared with compute(), and the composer section of prisma.config.ts
init writing a compute confignpx prisma init now writes a prisma.config.ts with only a skills section, adds prisma as a dev dependency, and syncs skills. Add the composer section yourself
compute:deploy scriptnpx prisma deploy module.ts, or the deploy script current create-prisma generates
app deploy --branch <name>npx prisma deploy module.ts --stage <name>
app deploy --prod, --no-promote, app promoteNo --stage deploys production; service version promote <version-id>
app show, app open, app list-deploys, app show-deployservice show <service>, service open <service>, service version list <service>, service version show <version-id>
app logsservice logs <service>
app rollback --to <id> --yesservice version rollback <service> --to <id> --confirm <id>
app domain ...service domain ... --service <service>
app removeRemove the provision() from module.ts and deploy, or service delete <service> --confirm <service>
build logs <build-id>The GitHub Actions run log or the Console; GET /v1/builds/{buildId} for state and failing step
database ...postgres ...
project env removeproject env delete
auth logout --workspace <id>auth workspace logout <id>
agent install, agent update, agent statusnpx skills add prisma/skills --skill prisma-compute; npx prisma skills sync for package skills
PRISMA_PROJECT_ID, PRISMA_APP_ID, PRISMA_SERVICE_ID--project <id-or-name>, the service as a positional argument, and .prisma/local.json from project link
/v1/apps REST endpoints/v1/services (the /v1/apps paths are deprecated)

A repository with prisma.compute.ts or a compute:deploy script was set up for the removed flow. Port it to Composer (app-composer-setup.md) instead of running the old commands.

When to Apply

Rule Categories by Priority

PriorityCategoryImpactPrefix
1CLI surfaceCRITICALcli-
2App declarationCRITICALapp-
3RuntimeCRITICALruntime-
4DeployHIGHdeploy-
5OperationsHIGHops-
6DebuggingHIGHdebug-
7AutomationMEDIUMautomation-

Quick Reference

1. CLI surface (CRITICAL)

2. App declaration (CRITICAL)

3. Runtime (CRITICAL)

4. Deploy (HIGH)

5. Operations (HIGH)

6. Debugging (HIGH)

7. Automation (MEDIUM)

Preferred Workflow

  1. Inspect package.json (is prisma 8.x a dev dependency, are @prisma/composer and @prisma/composer-prisma-cloud installed?), module.ts, prisma.config.ts, the build script, and leftovers from the removed flow (prisma.compute.ts, compute:deploy).
  2. Install what is missing and sync the package skills:
   npm install @prisma/composer @prisma/composer-prisma-cloud
   npm install -D prisma
   npx prisma skills sync
  1. Declare or port the app: app-composer-setup.md and app-framework-builds.md.
  2. Build, run npx prisma dev module.ts, and request each local URL it prints.
  3. Run npx prisma auth whoami --json. If envelope.result.authenticated is false, ask the user to run npx prisma auth login.
  4. Deploy a preview with npm run build && npx prisma deploy module.ts --stage <name> --json, or production without --stage once the user confirms. A new project needs a region.
  5. Request each printed URL, then npx prisma project link <app-name> and npx prisma service list --json (add --branch <stage> for a preview).
  6. Report the app name, stage, service ids, URLs, and database ids. Never report secret values.

Avoid

References

Docs: Compute, Deploy your first app, Composer, CLI reference.

Feedback

npx prisma feedback "<message>" sends anonymous feedback to the CLI team with the CLI version, Node.js version, and OS platform. Add --email <address> for a reply. Never include tokens, connection URLs, or user data.

同类技能
agents-sdkairunway-aks-setupappinsights-instrumentationazure-aiazure-aigatewayazure-app-onboardazure-app-onboard-prereqazure-cloud-migrate
本页内容来自开源项目 prisma, 版权归原作者所有。
本站仅作技能索引与分享,所有 Skill 版权归其原作者所有。