Tutorials
Setup Prisma
Demo Server
Create New DB
MySQL
Postgres
Connect Empty DB
MySQL
Postgres
Connect DB with Data
MySQL
Postgres
Build GraphQL Servers
Development
Build a GraphQL Server with Prisma
Build a GraphQL Server from Scratch
Build a Realtime GraphQL Server with Subscriptions
Deployment
Deployment with Now
Deployment with Up
Access Prisma from Scripts
Access Prisma from a Node script using Prisma Bindings
Connect to Prisma from the frontend
Bootstrapping Boilerplates
Reference
Service Configuration
Overview
Data Model
Data Modelling (SDL)
Migrations
Introspection
Server-side Subscriptions
Prisma Servers & DBs
Prisma Servers
OverviewDocker
Database Connectors
OverviewMySQLPostgres
Prisma Bindings
OverviewAPI
Code generation
Upgrade Guides
Upgrading Prisma
Overview
Upgrade to 1.7
Upgrade to 1.8

prisma deploy

Last updated a day ago Edit this page

Deploys service definition changes. Every time you're making a local change to any file in the service configuration (including the data model), you need to synchronize these changes with the remote service using this command.

Upon the very first deploy of a service, the command will perform initial data seeding if the seed property in prisma.yml is provided. You can prevent this by passing the --no-seed option.

If no endpoint property is specifed in prisma.yml, the command will prompt you to interactively select a Prisma server as a deployment target. After you selected the server, it will write it to prisma.yml as the default deployment target for future deploys. To bring up the interactive prompt again, simply remove the endpoint property from prisma.yml manually.

Usage

prisma deploy [flags]

Flags

-d, --dry-run              Perform a dry-run of the deployment
-e, --env-file ENV-FILE    Path to .env file to inject env vars
-f, --force                Accept data loss caused by schema changes
-j, --json                 JSON Output
-w, --watch                Watch for changes
--no-seed                  Disable seed on initial service deploy

Examples

Deploy service.
prisma deploy
Deploy service and interactively select a cluster as deployment target.
prisma deploy --interactive
Deploy service with environment variables specified in .env.prod.
prisma deploy --env-file .env.prod

Was this page helpful?