Prisma Deploy Docker error “Could not connect to server”

后端 未结 3 960
[愿得一人]
[愿得一人] 2021-02-06 11:53

This is steps I have done

prisma init

I set postgresql for database in my local(not exist).

It created 3 files, datamodel.graphql, dock

3条回答
  •  梦如初夏
    2021-02-06 12:25

    instead of docker-compose up -d USE:

    docker-compose up
    

    and keep the window running which will keep localhost:4466 alive.

    Note : If u want to connect to connect to the database created in docker, you need to map the port in the following way:

    docker run --name  -e POSTGRES_PASSWORD= -d -p 5433:5432 postgres  
    

    In the above case PORT(5433) = HOST_PORT and PORT(5432) = CONTAINER_PORT

提交回复
热议问题