Simple git clone, change dir and run
git clone https://github.com/yogendra/api-demo.git
cd apidemo
./mvnw spring-boot:run
Build docker image
./mvnw spring-boot:build-image
Push docker image
docker push ghcr.io/yogendra/api-demo:latest
Test application monitoring using local Prometheus and Grafana.
-
Run Prometheus locally
docker run -d --rm\ --add-host hostmachine:$(ipconfig getifaddr en0) \ -p 9090:9090 \ -v $PWD/monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \ --name prometheus \ --hostname prometheus \ prom/prometheus \ --config.file=/etc/prometheus/prometheus.yml
-
Run Grafana locally
docker run --rm -d \ --name=grafana \ --link prometheus:prometheus \ -v $PWD/monitoring/grafana/dashboards:/var/lib/grafana/dashboards \ -v $PWD/monitoring/grafana/provisioning:/etc/grafana/provisioning \ -v $PWD/monitoring/grafana/config.ini:/etc/grafana/config.ini \ -p 3000:3000 \ grafana/grafana
TODO
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Spring Boot DevTools
- Spring Configuration Processor
- Spring Web
- Spring Data JPA
- Spring Boot Actuator
The following guides illustrate how to use some features concretely: