Error

I got the following error when using Docker and postgresql. could not connect to server: Cannot assign requested address api Is the server running on host "localhost" (::1) and accepting api TCP/IP connections on port 5432?

Solution

Just make the following settings. host = database service name