hi :slightly_smiling_face: i just set up prisma, g...
# orm-help
n
hi 🙂 i just set up prisma, graphql-yoga and postgresql with docker. Also got the postdeploy hooks running, where after deploying the prisma service, the prisma.graphql schema will be refetched and the typescript prisma-client will be regenerated. Now here is my problem (in my personal & my official project with my teammate): GraphQL-yoga imports the schema.graphql, which indeed uses types and inputs from the generated prisma.graphql file, which can only be generated from a running prisma instance with a deployed prisma service. This is fine if you still have an 'old' prisma.graphql file, however deploying the prisma service will only update the generated files on the local computer and not in the docker container. Is there any way to also update the generated files in the docker container without having to install the prisma cli on docker and trigger things from there (we're also looking for a CI/CD solution for our second project)? My first idea would be something like: start docker container (already old prisma.graphql in the project) -> prisma deploy -> get-schema from endpoint -> prisma generate (the typescript prisma-client) -> COPY over the 'generated' folder
m
I'm still a bit of a beginner to docker but am learning alot from here (https://learndocker.online/courses) but from what I've learned so far I think you could use volumes to either insert or bind data into the container.
👍 1
I recommend the chapter on Persisting data in the docker fundamentals section
and then from docker docs (https://docs.docker.com/storage/)
n
thank you very much for the resources 🙂 Docker is really a complex tool. Even though i think i can handle creating images, setting up container etc. i still feel like i know just like 5% of how to really use it. Will definitely check this out! I also found a command with which you can copy over folders and files into the running docker container:
Copy code
docker cp folderToCopy/ <docker-container-id>:/folderToCopyTo/
m
no problem! I hope it helps you as much as it has me!
🙂 1
👍 1