I have a Spring Boot app with the following config:
spring:
thymeleaf:
cache: false
cloud:
consul:
host: consul
port: 8500
discovery:
prefer-ip-address: true
instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}}
that I want to run with docker-compose(Docker 1.11.2, docker-compose 1.7.1):
consul:
image: progrium/consul:latest
container_name: consul
hostname: consulhost
ports:
- "8400:8400"
- "8500:8500"
- "8600:53"
command: "-server -bootstrap-expect 1 -ui-dir /ui"
collector-server:
container_name: collector-server
image: io.thesis/collector-server
ports:
- "9090:9090"
links:
- consul:consul
Unfortunately that does not work, I get: com.ecwid.consul.transport.TransportException: java.net.ConnectException: Connection refused.
I have absolutely no idea why it can't connect to Consul, because I can connect to other systems , e.g. rabbitmq in other applications exactly this way.
Thank you for any ideas!