Deployment
This section describes how to deploy Node.js applications that use Prisma Client and TypeScript to various platforms.
If Prisma’s Rust engine binaries cause large bundle sizes, slow builds, or deployment issues (for example, in serverless or edge environments), you can switch to the queryCompiler
Preview feature introduced in v6.7.0.
When enabled, Prisma Client is generated without a Rust-based query engine binary, reducing build artifacts and removing native binary dependencies:
generator client {
provider = "prisma-client-js"
previewFeatures = ["queryCompiler", "driverAdapters"]
}
Note that the driverAdapters
Preview feature is required alongside queryCompiler
.
When using this architecture:
- No Rust query engine binary is downloaded or shipped.
- The database connection pool is maintained by the native JS database driver you install (e.g.,
@prisma/adapter-pg
for PostgreSQL).
This setup can simplify deployments in:
- Serverless functions
- Edge runtimes
- Read-only filesystem environments
- CI/CD pipelines with strict size limits
Learn more in the docs here. Curious why we're moving away from the Rust engine? Take a look at why we're transitioning from Rust binary engines to an all-TypeScript approach for a faster, lighter Prisma ORM in our blog post.
In this section
Deploy Prisma ORM
Projects using Prisma Client can be deployed to many different cloud platforms. Given the variety of cloud platforms and different names, it's noteworthy to mention the different deployment paradigms, as they affect the way you deploy an application using Prisma Client.
Traditional servers
Serverless functions
Edge functions
Module bundlers
Overview
Deploying database changes
To apply pending migrations to staging, testing, or production environments, run the migrate deploy command as part of your CI/CD pipeline:
Deploy migrations from a local environment
There are two scenarios where you might consider deploying migrations directly from a local environment to a production environment.
Caveats when deploying to AWS platforms
The following describes some caveats you might face when deploying to different AWS platforms.
Deploy to a different OS
Prisma Client depends on the query engine that is running as a binary on the same host as your application.