-
QuestionHello, I can't connect prisma to mongodb docker container. I got this message:
full log: https://github.com/dejurin/mongodb-prisma-docker-example/blob/main/log.txt How to reproduce (optional)I made repo with my example: https://github.com/dejurin/mongodb-prisma-docker-example In this repo I include 2 cases: app - prisma (TS/JS), and pyapp - pymongo to make sure the problem is not with mongodb. Expected behavior (optional)No response Information about Prisma Schema, Client Queries and Environment (optional)// Add your schema.prisma // Add any relevant Prisma Client queries here
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I updated if you remove (Dockerfile) the
So I conclude that initialization and schema creation should be done on the local computer before create docker compose. In my case, I tried to do all the steps while creating the containers. Old:
New
|
Beta Was this translation helpful? Give feedback.
I updated if you remove (Dockerfile) the
pnpm dlx prisma init --datasource-provider mongodb
and
pnpm dlx prisma db pull --force
then the prism connects and works fine.
So I conclude that initialization and schema creation should be done on the local computer before create docker compose. In my case, I tried to do all the steps while creating the containers.
Old:
New