lucaschen / microservices-demo

425 stars 142 forks source link

DNS resolver method is not clear #1

Closed wanderrful closed 4 years ago

wanderrful commented 4 years ago

Hi there!

Was studying your implementation for a while and I've found that it's unclear how you implemented the "Host File" (/etc/hosts) details based on what's in the Readme. Maybe I just haven't noticed it.

Was this project's Docker containers meant to be run as part of a Kubernetes cluster or something? I don't see where the --add-host command comes in for the Docker environment, based on the Compose file or the individual services' Dockerfiles.

Could you help clarify this in the Readme file? Thanks again for posting this.

lucaschen commented 4 years ago

Hi @wanderrful, thanks for your interest in this project!

No hosts file is needed! I assume you're referring to things like http://users-service? Docker automatically resolves this and replaces it with the internal IP address once you run docker-compose up. If you check out my complementary video series where I show you how to build this project from scratch, I explain this and more :) Hope this helps!