You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi ,
In my docker-compose file if I don't provide a host port mapping for my microservice, it is unable to register in eureka correctly as it gets registered with the server.port , but the host port is assigned randomly.
Seems that u´re using another project - not that one here (cxf-spring-cloud-netflix-docker)... So it´s not really related question ;)
But nevertheless: This registration process to Eureka is mostly done through setting the right config properties to your application.properties / application.yml file in your apps. Do you have a GitHub repo with your applications ready? You could also have a look into the projects in this repo here to get inspired. The critical props look like this:
Hi ,
In my docker-compose file if I don't provide a host port mapping for my microservice, it is unable to register in eureka correctly as it gets registered with the server.port , but the host port is assigned randomly.
this is my docker-compose file
version: '3'
services:
eureka:
restart: always
tty: true
image: eureka_server:1.0
working_dir: /app
volumes:
- ./eureka_server:/app
ports:
- 8761:8761
networks:
- lip
products:
restart: always
image: product-service-ms:1.0
tty: true
working_dir: /app
volumes:
- ./product-service:/app
ports:
- 8082
environment:
EUREKA_URI: "${EUREKA_URI}"
EUREKA_IP: "${EUREKA_IP}"
HOSTNAME: "${HOSTNAME}"
networks:
- lip
zuul-server:
restart: always
image: zuul-proxy-server:1.0
tty: true
working_dir: /app
volumes:
- ./zull-server:/app
ports:
- 80:80
environment:
EUREKA_URI: "${EUREKA_URI}"
EUREKA_IP: "${EUREKA_IP}"
HOSTNAME: "${HOSTNAME}"
networks:
- lip
zipkin:
restart: always
image: zipkin-server:1.0
tty: true
working_dir: /app
volumes:
- ./zipkin-server:/app
ports:
- 8096:8096
environment:
EUREKA_URI: "${EUREKA_URI}"
EUREKA_IP: "${EUREKA_IP}"
HOSTNAME: "${HOSTNAME}"
networks:
- lip
adminconsole:
restart: always
image: spring-admin-console:1.0
tty: true
working_dir: /app
volumes:
- ./zipkin-server:/app
ports:
- 8181:8181
environment:
EUREKA_URI: "${EUREKA_URI}"
EUREKA_IP: "${EUREKA_IP}"
HOSTNAME: "${HOSTNAME}"
networks:
- lip
networks:
lip:
driver: bridge
Please help with this issue.
The text was updated successfully, but these errors were encountered: