Docker error Can't reach database server at localhost:5432
I'm using docker compose and my server api depends on a postgres server in the same container. During the build I run
prisma migrate deploy
prisma migrate deploy
and get this error. I also tried replacing localhost with 0.0.0.0 and db (my database's docker service name) but it does not work. Strangely from my dev machine I'm able to run
prisma migrate dev --name init
prisma migrate dev --name init
without issue using this same DATABASE_URL variable.