Prisma Studio Demo Deployments
This repository holds all code to deploy a demo version of Studio to Now
Deployment Rules
- The
master
branch is always deployed at https://prisma.studio - All other branches are deployed at https://-prisma-studio.now.sh
- All pull requests to
develop
are deployed at https://-prisma-studio.now.sh
Adding a new dataset/project
- Create a new branch from
develop
and think of an all lowercase project name. This will serve as the project's ID. - Add the new project to
packages/demo/public/projects.html
. Duplicate one of the<div class="project">
s and change content. - Create a new folder in
packages/demo/projects/
with its name being the project ID. Place your Prisma Schema inside. - In your
schema.prisma
, replace thedatasource
andgenerator
blocks with the following (replace content inside<>
):
generator client {
provider = "prisma-client-js"
output = "../../node_modules/.prisma/client/<project-id>"
binaryTargets = ["rhel-openssl-1.0.x"]
}
datasource db {
provider = "postgresql"
url = env("PROJECT_<PROJECT_ID>_URL")
}
- Add an env var to Vercel with this exact name so deployments can work correctly.
- Commit your changes to your branch, then open a pull request to
develop
, adding a reviewer. - Once all checks complete, you should be able to view your changes over at the URL Vercel deployed it to (there should be a comment on your PR)