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:
17
Dockerfile
17
Dockerfile
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user