Closed anigkus closed 1 year ago
This is a valid point. However, I believe that changing the IP address to 127.0.0.1 directly may lead to some unforeseen issues. For instance, if the demo operates without Docker, it could be accessed by other machines within the same local area network, but this would no longer be possible after making the change. Additionally, in the Docker scenario, it is likely that apollo-portal would be unable to access apollo-adminservice.
Having said that, I still think we can make improvements. For example, we could add a demo configuration to the JAVA_OPTS section and include some explanatory comments.
Okay,then you can only change the “docker-compose.yml “file.
This pull request has been automatically marked as stale because it has not had activity in the last 21 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!
This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!
It is recommenbed that if you are useing default built-in registration center,add
-Deureka.instance.ip-address=127.0.0.1
parameter. Because the current IP is used by default,it is currently the internal IP of the container(172.17.0.1/24), which is okay it can not be provided to outside calls. Useing scenarios such as (javasdk/openapi
), it is vert useful to verify these functions. Because theRemoteConfigRepository
inapollo-client
uses the registration address of the service to send the request. Then get the relavant configuration infomation.The log is as follows:
Success: Long polling from http://127.0.0.1:8080/notifications/v2?cluster=default&appId=SampleApp&ip=192.168.12.113&。。。
Fail: Long polling from http://172.17.0.3:8080/notifications/v2?cluster=default&appId=SampleApp&ip=192.168.12.113&。。。
Note
You need to rebuild the
apollo-quick-start
container.docker build -t nobodyiam/apollo-quick-start . -f ./Dockerfile