The purpose of this project is to present a full example of docker deployement with 2 Rest Api and Zuul as proxy and Eureka as "DNS".
The port for Zuul proxy has been set to 80 to hide the port in url and make it more convenient for WebDesigner using angular for example.
- Clone the repository
git clone https://github.com/batiwo/zuul-eureka-docker.git
- Build the
zuul-eureka-docker
project withmvn install
- Run all submodules JAR with
java -jar xxx.jar
(in the following ordereureka-server
,zuul-server
,rest1-server
,rest2-server
) - Go to http://localhost:8761/ for eureka dashboard.
- Access rest1 api http://localhost/rest1/admin/page1 through Zuul proxy
- Access rest2 api http://localhost/rest2/download/page1 through Zuul proxy
- Access swagger-ui documentation for rest1 at http://localhost/rest1/swagger-ui.html through Zuul proxy
- Access swagger-ui documentation for rest2 at http://localhost/rest2/swagger-ui.html through Zuul proxy
- Clone the repository
git clone https://github.com/batiwo/zuul-eureka-docker.git
- Build the
zuul-eureka-docker
project withmvn install
- Run
docker-compose up
- Go to http://localhost:8761/ for eureka dashboard.
- Access rest1 api http://localhost/rest1/admin/page1 through Zuul proxy
- Access rest2 api http://localhost/rest2/download/page1 through Zuul proxy
- Access swagger-ui documentation for rest1 at http://localhost/rest1/swagger-ui.html through Zuul proxy
- Access swagger-ui documentation for rest2 at http://localhost/rest2/swagger-ui.html through Zuul proxy
If the given URL do not work please be patient it could take up to 1 minutes to configure and discover all services by Zuul and Eureka.
Ensure that the red message disappear before testing requests (to ensure all service are configured).