A maven spring boot cart application.
Environment variables can be provided to configure the cart service.
- CATALOG_ENDPOINT - Endpoint of the catalog endpoint
Keycloak configurations
- KEYCLOAK_REALM - Keycloak realm name.
- KEYCLOAK_URL - Keycloak authentication URL.
- KEYCLOAK_CLIENT_BACKEND - Keycloak client for backend token based authentication.
- KEYCLOAK_CLIENT_SECRET_KEY - Keycloak secret key for accessing the keycloak client backend.
It requires following things to be installed:
- Java: ^8.0.
- Maven
To run the application locally use the command given below:
mvn clean spring-boot:run
To deploy app inside a docker container
-
Create a network if it doesn't already exist by executing
docker network create --driver bridge nordmart-apps
-
Build jar file of the app by executing
mvn clean package
-
Next build the image using
docker build -t cart .
-
Finally run the image by executing
docker run -d --name cart --network nordmart-apps -p 8082:8080 -e CATALOG_ENDPOINT="catalog:8080" cart
Note: Make sure that catalog is running before running this.
Helm operator needs to to be running inside the cluster. Helm operator is deployed by Stakater Global Stack, deployment guidelines are provided in this link
To create helm release of this application using the command given here:
kubectl apply -f helm-release.yaml -n