Skip to content

guidance for production dockerfile and monorepos #7302

@mimoo

Description

@mimoo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions