Skip to content

Latest commit

 

History

History
79 lines (45 loc) · 1.52 KB

README.md

File metadata and controls

79 lines (45 loc) · 1.52 KB

spring-boot-mongodb-example

Docker Image CI

Spring boot service with mongoDB CRUD example

Description

This is a simple example of a Spring boot service with mongoDB CRUD.

Development

Start MongoDB, Prometheus, Grafana, and the service with the following commands:

docker-compose up -d

Alt text

Connect MongoDB using Compass The GUI for MongoDB:

Alt text

Stop the service with the following command:

docker-compose down

Running MongoDB as a Docker Container

You can start a MongoDB container using Docker with the following command:

docker run -d -p 27017:27017 --name mongodb mongo

Gradle build

gradle bootRun

Access actuator

http://localhost:8080/actuator

http://localhost:8080/actuator/health

Swagger UI

http://localhost:8090/api-docs/

http://localhost:8090/swagger-ui/index.html

Alt text

Prometheus (Monitoring)

http://localhost:8080/actuator/prometheus

Alt text

Check Prometheus scraping metrics:

Raw metrics: http://localhost:9090/metrics

Alt text

http://localhost:9090/graph

Alt text Alt text

Contacts

Owner: [email protected]