hello guys, why do i keep getting this error? What...
# orm-help
a
hello guys, why do i keep getting this error? What am I not doing right?
j
is the server at 5432 running?
a
yeah
@Jonathan
j
have you tried answering “no” for use ssl?
Or ensuring that you have ssl setup correctly for local
a
Yeah, i tried the no option and there was no luck
@Jonathan
j
what does your docker-compose file look like?
a
Copy code
version: "3"

services:
  prisma:
    image: prismagraphql/prisma:1.26
    ports:
      - "4466:4466"
    environment:
      PRISMA_CONFIG: |
        port: 4466
        databases:
          default:
            connector: postgres
            host: postgres
            port: 5432
            user: prisma
            password: prisma
            migrations: true

  postgres:
    image: postgres:10.5
    environment:
      POSTGRES_USER: prisma
      POSTGRES_PASSWORD: prisma
    volumes:
      - postgres:/var/lib/postgresql/data

volumes:
  postgres:
@Jonathan
j
where’d that code come from?
a
which code are you talking about?
The docker-compose file is the one in prisma's guide on getting started
j
it’s using an older version
1.26
so you may be looking at older docs
a
wait, is that probably why it's failing to connect?
j
it could be
i’d first try following along with the newest docs
also ensuring that the database server is actually up and running…can you get to it with tableplus?
a
the database server is up and running
j
docker ps lets you know that the container is up
but you should ensure that you can actually get to the database
a
clearly, I can get to the database
@Jonathan
j
that’s great
closer look at your docker compose…try exposing your port
a
how should i expose my port?
@Jonathan
j
postgres: image: postgres:10.3 restart: always environment: POSTGRES_USER: prisma POSTGRES_PASSWORD: prisma volumes: - postgres:/var/lib/postgresql/data ports: - “5432:5432”
anything interesting in your docker logs for the postgres container?
a
Hey
n
@ahebwa49 are you using Docker Toolbox? If you run docker engine in a VM, you should access your containers through the VM's IP address
a
Hey, thanks to you @nuno exposing the ports by @Jonathan did the trick😉
👍 1
This was a miscalculation, error still persits
@nuno
@Jonathan
n
I see in your 1st screenshot, you've set "Enter database host *localhost*". Try with postgres, the name of the service defined in the compose file.