PG::ConnectionBad Connection refused

I’m running a ruby on rails application
With docker, postgresql and virtualbox

but when I run the command

docker-compose up --build

and open it in the browser: http://192.168.99.100:3000

I get this error:

PG :: ConnectionBad
could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP / IP connections on port 5432?

What can this be?

Source: Docker Questions

LEAVE A COMMENT