These are chat archives for spring-cloud/spring-cloud

15th
Dec 2015
Fairuz Wan Ismail
@wmfairuz
Dec 15 2015 03:42
@ryanjbaxter In my current environment, we did use a docker host to host all the microservices containers. It works pretty well. And yes, I use preferIpAddress
Matt Reynolds
@mattreyuk
Dec 15 2015 04:38
@ryanjbaxter If you're using docker-compose, the name you give the container is also added to the hosts file of any linked containers so you can just use http://eureka:8761 in your case. I do a little extra re-direction by specifying the eureka.client.serviceUrl.defaultZone in my bootstrap.yml with an environment variable ${eureka.uris} then in the docker-compose file, I can specify that for the client under environment with http://eureka:8761 that way I have a general environment variable I can use outside of docker. I have run in config first mode using the config server to find Eureka but you still need to pass in a reference to find the config server then and you need to look at setting up retry on the config server as everything's starting up together. The other nice thing about using preferIpAddress is that you can docker-compose scale to spin up extra instances of your service as long as you don't map your port through to the host if you're running on a single machine.