This is a simple single-page web application that displays a dashboard for a fictional "ShopSync" service. The dashboard has two views: a "Vendor Panel" and a "Customer Panel", which can be toggled.
This is a Java web application built with Maven. To build the application, run the following command from the root of the repository:
mvn clean installThis will create a myweb-0.0.3.war file in the target directory.
The application can be run in a Docker container. First, build the application as described above. Then, build the Docker image:
docker build -t shopsync-dashboard .Once the image is built, you can run it with the following command:
docker run -p 8080:8080 shopsync-dashboardThe application will be available at http://localhost:8080.
A Kubernetes deployment file is provided in deployment.yml. To deploy the application to a Kubernetes cluster, you first need to publish the Docker image to a registry that your cluster can access. The deployment.yml file is configured to use the image rxnjitth/scenario:latest, so you will need to tag your image and push it to Docker Hub (or another registry).
-
Tag the image:
docker tag shopsync-dashboard rxnjitth/scenario:latest
-
Push the image to Docker Hub:
docker push rxnjitth/scenario:latest
-
Deploy to Kubernetes:
kubectl apply -f deployment.yml
This will create a deployment and a LoadBalancer service. You can get the external IP of the service by running:
kubectl get svc scenario-lbThe application will be available at http://<EXTERNAL-IP>:8080.