Sample spring boot applicaton, powered by spring boot framework, based on a simplified microservices architecture and Docker containers.
If you’re using this demo, please ★Star this repository to show your interest!
Image | Status | Image | Status |
---|---|---|---|
Basket API | Web Client (SPA) | ||
Catalog API | WebHooks API | ||
Ordering API | Webhooks Client | ||
Payment API |
Make sure you have installed and configured docker in your environment. Your hosts file should also have the following entry.
127.0.0.1 host.docker.internal
After that, you have to manually override the password for github server in the settings.xml file with "g h p _ F u A h I T L s n B F z C r R u D 4 W u s d m N 2 u Z g K e 2 z 4 t C D" after removing the spaces between them. This token will allow to download the maven packages from github. Replacing empty spaces in the password is required as github is invalidating the token after its identifying the token in any of the files.
Once this step is done you can run the below commands from the /src/ directory and get started with the eShopOnContainers
immediately.
docker-compose build
docker-compose up
You should be able to browse different components of the application by using the below URLs :
Web SPA : http://host.docker.internal:8080
Credentials: [email protected]/Pass@word
Note: If you are running this application in macOS then use
docker.for.mac.localhost
as DNS name in.env
file and the above URLs instead ofhost.docker.internal
.
The basic scenario can be run locally using docker-compose, and also deployed to a local Kubernetes cluster. Refer to these Wiki pages to Get Started:
If you are following docker compose setup, the setup will automically provision containers for monitoring your services. All of the observability aspects like logs, traces and metrics can be directly viewed from Grafana
You should be able to access grafana at the following link. Default credentials are admin/admin
After navigating to grafana, select the explore option from the left menu.
From the datasources dropdown, select Loki
From the label filters, select the label as application and from the value label select the microservice.
select the time range, and click on Run query.
After login to grafana, select Dashboards option from the Left menu. You should see, an existing dashboard with the name JVM (Micrometer) Click on the dashboard to open it. From the dashboard options in the top, select the application and instance to get the metrics of that service.
IMPORTANT: The current state of this sample application is BETA, because we are constantly evolving towards newly released technologies. Therefore, many areas could be improved and change significantly while refactoring the current code and implementing new features. Feedback with improvements and pull requests from the community will be highly appreciated and accepted.