I don't know if it's suitable to ask the question here, feel free to close/delete it if not.
I see something like below in docker-compose files.
ordering.api:
environment:
- identityUrl=http://identity.api:5105
In the Startup.cs of Ordering.API project, the configuration value (I think it's http://identity.api:5105) is used. How does it work? Or somewhere else identity.api will be translated to the correct address?
Hi @FDUdannychen
Basically, all docker containers started by docker-compose run in the same network, created by Docker. Under this network containers can see between them by using their name (name defined in the docker-compose file).
If you look docker-compose.yml file you'll see that the container running Identity Server is named "identity.api". That means that any other container can access this container using this name (identity.api).
Closing the issue after Eduard explanation.
Most helpful comment
Hi @FDUdannychen
Basically, all docker containers started by docker-compose run in the same network, created by Docker. Under this network containers can see between them by using their name (name defined in the docker-compose file).
If you look docker-compose.yml file you'll see that the container running Identity Server is named "identity.api". That means that any other container can access this container using this name (identity.api).