This site is hosted in OpenShift. Shopper
This project is supposed to be an API-Gateway for the shopping app. Behind this api-gateway, there are microservices this api-gateway is supposed to call.
This is done via mvn spring-boot:run
command, or running through IDE.
Zuul is the api-gateway that we are going to use. In order to see the power of Zuul, we will need to create different microservices, which will then be called by Zuul based on path and different configurations.
The microservices are discussed below.
Tags refer to a milestone for a project. Refer to it if:
v1
contains plain project.assoc-product-micserv
- connects to Product microservicefirst-docker-image
creates first docker image
ApiGateway is a part of microservice architecture to create a e-commerce website.
If you want to build Docker image, you can do so.
In pom.xml
, configure the <dockerImage>
property value,
which is currently set as rockink/apigateway:v2Static
and then build using mvn compile jib:dockerBuild
docker network create -d bridge mynetwork
docker run -e "JAVA_TOOL_OPTIONS=-Xms200m -Xmx200m" -p 8090:8090 --name apiGateway --network mynetwork rockink/apigateway:v2Static
docker run -e "JAVA_TOOL_OPTIONS=-Xms200m -Xmx200m" -p 8080:8080 --name product --network mynetwork rockink/product:v1
docker run -d -p 80:80 --name static --network mynetwork rockink/shopper:v2
To run
http://localhost:8090