Comments (14)
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.
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.
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.
Yes thats what I said by "dev and prod environment", and docker-compose/kubernetes would be the cherry on top π
from docs.
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.
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.
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.
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.
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.
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
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.
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.
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.
@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.
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)
- Add more context to the introspection that depicts the "introspection worfklow"
- `<Button>` MDX component HOT 1
- Anchor links on the same page are rendered as external links and open in new tab
- Error with the update in Best practice for instantiating Prisma Client with Next.js HOT 1
- Test issue
- Database type -> JS Type Mapping table is incorrect for unsigned ints
- Code snippets shrink in width when a `TabbedContent` component is used. HOT 1
- Inconsistent line height in tables when code formatting is used
- Add instructions for restarting IDE after prismaSchemaFolder enablement
- list-changed-pages.yml: Long branch names lead to invalid Cloudflare preview links
- Documentation on omitting fields is incomplete
- Soft delete middleware does not prevent deleteMany in relational query HOT 4
- Test Web Issues
- convert inline code strings to terminal code blocks in Getting Started HOT 1
- [fix] mobile view page overflow
- Nothing is there on the Tools page HOT 1
- Choose which database we are using HOT 2
- Update `createManyAndReturn` docs with nested relation workarounds
- update doc about creating a migration (an empty migration to be more precise)
- Selecting the Language model once prisma has been installed as an extension on Visual studio code HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.