Pydgraph Client connection error : UNKNOWN - failed to connect to all addresses

As I said, there’s no way to connect to Dgraph via Localhost from inside a container. Unless your application run in the Host itself, it will never work. Use alpha:8080 or alpha:9080 instead.

The error says

UNKNOWN: ipv4:127.0.0.1:9080: Failed to connect to remote 
host: Connection refused

So, the connection is refused cuz there’s nothing there in 127.0.0.1. As your application is in a container and in the same network of Dgraph’s container you should use the container name as URL. That’s created in Docker’s DNS resolution.

Cheers.