I use docker compose to run all my microservices. For each service, I give a short host name.
version: '2' services: config: image: springbox-config-server restart: always ports: - "8890:8890" discovery: image: springbox-eureka restart: always ports: - "8763:8763"
Therefore, in my microservice, I have to target the configuration server with its short host name.
spring: application: name: myservice cloud: config: uri: http://config:8890 fail-fast: true
However, when I run them locally in my IDE without dockers, the short host name cannot be resolved.
So, I am looking for a solution to configure another configuration server to suit my environment.
spring-cloud docker
Hui wang
source share