docs icon indicating copy to clipboard operation
docs copied to clipboard

guidance for production dockerfile and monorepos

Open mimoo opened this issue 1 month ago • 0 comments

There are a number of things that I find intriguing or vague for my setup (monorepo, dockerfile to build prod images).

  1. In https://github.com/prisma/docs/blob/main/content/800-guides/130-docker.mdx they run db:deploy at runtime in the example dockerfiles, but in production you want to build as much as you can at build time! So I would imagine that you would want to run prisma generate at build time via RUN
  2. wouldn't we want to add the generated folder in .Dockerignore so it doesn't get copied in docker? Also in .gitignore (mentioned in https://www.prisma.io/docs/guides/turborepo but not in the docker page)
  3. when exporting a generated prisma client (https://www.prisma.io/docs/guides/turborepo), I would think that it would make more sense to export it as a workspace package and refer to it not via a relative path but via the workspace package name

mimoo avatar Nov 20 '25 20:11 mimoo