refactor: replace Spring Boot with Jooby framework

- Remove Spring Boot dependencies and annotations.
- Implement Jooby MVC controllers and Guice dependency injection.
- Migrate persistence layer to Ebean ORM.
- Configure Flyway migrations and ApiErrorController.
- Update application configuration to HOCON format.
This commit is contained in:
2026-03-02 16:38:11 +01:00
parent 83070ccbda
commit 707baf8cbc
78 changed files with 1266 additions and 974 deletions

View File

@@ -26,21 +26,26 @@ FROM eclipse-temurin:21-jre-alpine
WORKDIR /app
# Seguridad: Usuario no-root
RUN addgroup -S spring && adduser -S spring -G spring
USER spring:spring
RUN addgroup -S app && adduser -S app -G app
RUN mkdir -p /app/tmp && chown app:app /app/tmp && chmod 777 /app/tmp
RUN mkdir -p /app/logs && chown app:app /app/logs && chmod 777 /app/logs
USER app:app
# Copiamos solo el JAR final (ajustado a tu módulo bootstrap)
COPY --from=build /app/bootstrap/target/*.jar app.jar
COPY --from=build /app/bootstrap/target/bootstrap-*.jar app.jar
# Configuración de Memoria y Rendimiento para Microservicios
# -XX:+UseSerialGC: Menos consumo de RAM para apps < 1GB
# -XX:TieredStopAtLevel=1: Arranque más rápido y menos uso de RAM del compilador JIT
# -XX:MaxRAMPercentage: Se ajusta dinámicamente al límite de Docker
ENV JAVA_OPTS="-XX:+UseContainerSupport \
-XX:MaxRAMPercentage=75.0 \
-XX:MaxRAMPercentage=50.0 \
-Xms32m \
-Xmx96m \
-XX:+UseSerialGC \
-XX:TieredStopAtLevel=1 \
-Xms128m"
-XX:TieredStopAtLevel=1"
EXPOSE 80