Skip to content

Example of running Spring Application with Eureka and Config servers in docker

License

Notifications You must be signed in to change notification settings

bkuzmic/spring-cloud-docker-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-cloud-docker-sample

Example of running Spring Application with Eureka and Config servers in Docker.

This is how to setup and run example.

NOTE: Make sure you have Docker and Maven installed.

Build the example with Maven:

mvn compile jib:dockerBuild

This will create 3 separate docker images:

  • spring-cloud-docker-eureka-server
  • spring-cloud-docker-config-server
  • spring-cloud-docker-app

Initialize Git config repository (use by Config server):

cd git_config

git init

cd ..

Run using docker-compose:

docker-compose up

The end result is this:

  • When application boots, it will register itself with the Eureka server. After that, it will lookup Config server and fetch all of its configuration. At last it will print the spring.data.mongodb.uri property to System.out.

About

Example of running Spring Application with Eureka and Config servers in docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages