This repository has been archived by the owner on Sep 2, 2022. It is now read-only.
"Error: Invalid Prisma endpoint provided" when using docker-compose to deploy a server alongside prisma server #3367
Labels
status/on-hold
This issue is on hold.
Describe the bug
When using
docker-compose
to deploy a server (e.g. Apollo Server or graphql yoga) talking to prisma server, it is not possible to reference the prisma server container by its name because of string validation inprisma-binding
module :/app/node_modules/prisma-binding/dist/Prisma.js:44
throw new Error("Invalid Prisma endpoint provided: " + endpoint);
To Reproduce
Consider a docker-compose file:
the graphql server running in the server container will try initialise the prisma binding like so :
When running
docker-compose up
this will throw an error when the server image is built and starts running :Error: Invalid Prisma endpoint provided: prisma
This is because it expects the prisma endpoint to start with http://
When deploying to a kubernetes cluster I am experiencing the same issue because the ClusterIP service name for my prisma server pod doesn't start with "http://". Hence the server pod can't talk to prisma server inside the cluster because it crashes with the same error.
Expected behavior
I should be able to take advantage of docker-compose networking tooling with prisma (a container can reference another container's IP address using its name).
Referencing the prisma server from another service by its name (e.g. "prisma") should work.
Idem in k8s when referencing prisma by its service name from another pod.
The text was updated successfully, but these errors were encountered: