Skip to content

Error: P1001: Can't reach database server at localhost:5432 #6

@righes

Description

@righes

I have a probleme to connect to the postgres on docker.
I have the env ::
DATABASE_URL="postgresql://postgres:123@localhost:5432/nest?schema=public"
and the docker-compose ::
version: '3.8' services: dev-db: image: postgres:13 ports: - 5434:5432 environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: 123 POSTGRES_DB: nest networks: - freecodecamp networks: freecodecamp:
I do on the terminal ::
npx prisma migrate dev
i have ::
Error: P1001: Can't reach database server at localhost:5432

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions