Hi all, does anyone know how i can access my datab...
# orm-help
d
Hi all, does anyone know how i can access my database when i setup prisma with docker on my local machine
n
I think he/she means to access a database running as a docker service...
You need to expose the service port to the host
v
That’s what the comment on Github above talks about. The port is already exposed in the default docker file by Prisma. The issue is the host.
Copy code
-           host: localhost
+           host: host.docker.internal
n
Or better, in my opinion, have some service running on docker to access the database, like phpMyAdmin or Adminer
I skimmed through that, and I don't understand why they use
host.docker.internal
as the database host
Why not use the service name?
v
whatever works, as long as it does
n
Have the prisma and database servers on the same docker network and just use the name of the database server
There's no need to expose the database port on the host
v
unless you want to point a client from the host directly to the DB
n
Sure, but I prefer to just launch a docker service to serve as database client
v
that works unless you want a Mac-native GUI app as a client.
your preference is your preference
n
Thats what I've said