PoC (Proof of Concept) project to test service registration and discovery in microservices architecture.
To try this project on, we suggest to use Docker.
1- download de git repository
git clone https://github.com/lucasmauricio/service-discovery.git
2- build the Java application
mvn clean package
3- create the docker image
docker build -t my_registrator .
4- run your docker image
docker run -d --name my_registrator -p 9000:8080 registrator
5- just access the base URL to see data Type this URL on your web browser: http://localhost:9000/assets
or
curl http://localhost:9000/assets
To see running containers:
docker ps
To see all containers:
docker ps -a
To stop a container:
docker stop my_registrator
To start an existing container:
docker start my_registrator
To see the logs (STDIN) of a container in the terminal:
docker logs start my_registrator
To attach the logs (STDIN) of a container to the current terminal:
docker logs -f start my_registrator
https://spring.io/guides/gs/spring-boot-docker/
https://blog.tutum.co/2015/06/03/docker-angularjs-and-tutum-part-1/