leechaoqiang / spring-cloud-ping-pong-sample

Sample spring-cloud based app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Up and running with Sample Spring-Cloud based app

There are two ways to run the entire application:

  • On Local Machine

  • Using Docker

On Local Machine

Running it all local is simple, do the following in sequence, in four different terminal windows:

Start up Eureka
cd sample-eureka
mvn spring-boot:run
Start up Config server
cd sample-config
mvn spring-boot:run
Start up Pong Service
cd sample-pong
mvn spring-boot:run
Start up Ping Service
cd sample-ping
mvn spring-boot:run

If all the applications have come up cleanly, the endpoint should be available at http://localhost:8080

On Docker

Running using Docker is even simpler, assuming that docker-compose and docker are installed on your box, just run the following:

Build the docker images for the microservices
mvn clean package docker:build
Start up Docker containers
docker-compose up

That is it, the endpoint should be available at http://dockerhost:8080

About

Sample spring-cloud based app


Languages

Language:Java 80.0%Language:HTML 13.2%Language:JavaScript 4.4%Language:Shell 1.5%Language:CSS 1.0%