Problem configuring local PostgreSQL server

How about running Postgres in a Docker?

  • Install Docker

  • in Docker Desktop, go to Containers and Run Postgres installation (or via terminal docker pull postgres)

  • go to images, choose Postgres Run and add optional settings:

    1. Set port to YOURPORT and
    2. environment variables: POSTGRES_PASSWORD – YOURPASSWORD
    3. default user will be postgres, as you state, so YOURUSER = postgres
  • in .env file write DATABASE_URL=postgres://YOURUSER:YOURPASSWORD@localhost:YOURPORT/rw_auth
    and in schema.prisma use url = env("DATABASE_URL")

I hope this works. Only issue might be, that the setup of postgres in docker changed a bit.

2 Likes