/service-discovery-example

Spring service discovery example for education purposes (with Docker)

Primary LanguageJava

spring-service-discovery-example

Spring service discovery example for education purposes (with Docker)

Architecture picture
img.png

Projects
discovery (8080 port) - spring eureka server
frontend (8081 port) - spring frontend(ping) service
backend (8082 port) - spring backend(pong) service

Local run
gradle run bootRun task for each project

Docker

  1. gradle run jibDockerBuild task for each project
  2. docker-compose up

GET http://localhost:8081/backend/ping
returns pong + service instance-id

scale backend container whatever you want