Giter VIP home page Giter VIP logo

Comments (14)

yovanoc avatar yovanoc commented on August 16, 2024 5

As @schickling pointed prisma/prisma#54 (comment) here's my issue about a more specific doc/tutorial. I still think it would be good to have a monorepo example with yarn workspaces and kubernetes maybe.

from docs.

yovanoc avatar yovanoc commented on August 16, 2024 2

No I’m really struggling with the monorepo things and docker. Like how to take only packages dist folder and put these together with the prisma folder and run all of these things. I’m new with docker and I was thinking that an example of that with docker compose and a yarn workspaces would be great because it’s harder than a simple docker example like this one that I understand and I think that other people could be interested too

from docs.

Sytten avatar Sytten commented on August 16, 2024 1

I created a guide that might help you https://medium.com/@emilefugulin/building-a-sane-docker-image-for-typescript-lerna-and-prisma-2-76d8ff9926e4

from docs.

yovanoc avatar yovanoc commented on August 16, 2024 1

Yes thats what I said by "dev and prod environment", and docker-compose/kubernetes would be the cherry on top πŸ˜‚

from docs.

Sytten avatar Sytten commented on August 16, 2024 1

Not really, but it should be fairly easy to do if you mount the directory directly. Also my guide is not up to date with the latest beta.4 changes.

from docs.

yovanoc avatar yovanoc commented on August 16, 2024

I would like to add if we can setup a postgres or other database system with docker-compose too, could be nice, thanks

from docs.

divyenduz avatar divyenduz commented on August 16, 2024

There is a docker example now: https://github.com/prisma/prisma-examples/tree/prisma2/deployment-platforms/docker

Not specifically with docker-compose + yarn workspaces though but if this already solves your issue, please feel free to close it.

from docs.

yovanoc avatar yovanoc commented on August 16, 2024

I tried today to experiment this and I'm quite confused again. I see the PR for the new @prisma/photon way and we have to install prisma2 as a dev dependency but with docker multi stage builds we can't use prisma2 generate in the final stage because it's only for production things

from docs.

pantharshit00 avatar pantharshit00 commented on August 16, 2024

I am not sure about what you mean by this. We are still generating the photon api in the node_module. Facade was done so that we can get rid of issues caused by not having photon in package.json. Also, you will need to add @prisma/photon in the package.json instead of prisma2. CLI is still optional.

from docs.

yovanoc avatar yovanoc commented on August 16, 2024

I'm trying to use this https://docs.docker.com/develop/develop-images/multistage-build/
In my last stage I only build node_modules used for production, so only dependencies and not devDependencies and I get this error
image

We have to prisma2 generate but we can't because prisma2 have to be in devDependencies and only dependencies are available here.

I don't know if I'm well explaining this

from docs.

pantharshit00 avatar pantharshit00 commented on August 16, 2024

You mean the generated API is not persisted because you prune the node_modules. In that case, you can choose to generate photon somewhere else or install the cli globally and run it after you install the devDependencies.

from docs.

yovanoc avatar yovanoc commented on August 16, 2024

oh great explanation, but i'm kinda noob in docker things and I try to learn with docker-compose right now for multiple packages in the workspace, then I really don't know how to have a dev and a prod environment with that kind of setup..

from docs.

nnennajohn avatar nnennajohn commented on August 16, 2024

@Sytten would you happen to have a guide on the same setup but for local development, like where it compiles continuously and syncs files to docker? Thanks.

from docs.

tanberry avatar tanberry commented on August 16, 2024

Hullo, the Prisma Docs team is closing older tickets that might be stale or no longer relevant. If you feel we have closed this Issue in error, please feel free to re-open it, or create a new Issue to update the topic. Thank you for being involved in our docs!

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.