From e76bc06f688749c5093cde2b4bd651048503a387 Mon Sep 17 00:00:00 2001 From: roma-dxunvrs Date: Sat, 3 Oct 2026 22:15:11 +0300 Subject: [PATCH] feat: complete todo backend with monitoring - Spring Boot REST API with CRUD operations - PostgreSQL with HikariCP connection pool - Multi-stage Docker build (Gradle 8.14 + JRE Alpine) - Docker Compose orchestration - Prometheus metrics collection - Grafana dashboards (app & database) - Clean layered architecture (Entity/Repository/Service/Controller/DTO) - Global exception handling - Actuator health checks --- .gitignore | 4 +++- Dockerfile | 12 +++++++++++- HELP.md | 24 ++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 HELP.md diff --git a/.gitignore b/.gitignore index c2065bc..ff3ded0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -HELP.md .gradle build/ !gradle/wrapper/gradle-wrapper.jar @@ -35,3 +34,6 @@ out/ ### VS Code ### .vscode/ + +### Docker ### +*.jar diff --git a/Dockerfile b/Dockerfile index cbfe05e..f513521 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,18 @@ +FROM gradle:8.14-jdk21 AS build + +WORKDIR /app + +COPY build.gradle settings.gradle ./ +COPY gradle ./gradle +COPY src ./src + +RUN gradle clean build -x test --no-daemon + FROM eclipse-temurin:21-jre-alpine WORKDIR /app -COPY build/libs/*.jar app.jar +COPY --from=build /app/build/libs/*.jar app.jar EXPOSE 8080 diff --git a/HELP.md b/HELP.md new file mode 100644 index 0000000..beb8d6d --- /dev/null +++ b/HELP.md @@ -0,0 +1,24 @@ +# Getting Started + +### Reference Documentation +For further reference, please consider the following sections: + +* [Official Gradle documentation](https://docs.gradle.org) +* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/4.1.1/gradle-plugin) +* [Create an OCI image](https://docs.spring.io/spring-boot/4.1.1/gradle-plugin/packaging-oci-image.html) +* [Spring Web](https://docs.spring.io/spring-boot/4.1.1/reference/web/servlet.html) +* [Validation](https://docs.spring.io/spring-boot/4.1.1/reference/io/validation.html) + +### Guides +The following guides illustrate how to use some features concretely: + +* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) +* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) +* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/) +* [Validation](https://spring.io/guides/gs/validating-form-input/) + +### Additional Links +These additional references should also help you: + +* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle) +