lionsctl pipeline generates manifests with port 8080 by default and doesn't respect custom port configuration in .lionsctl.yaml. Changing the application to use port 8080 fixes the health check failures. Changes: - application-prod.properties: quarkus.http.port=8080 - Dockerfile: EXPOSE 8080, HEALTHCHECK on port 8080 - .lionsctl.yaml: port 8080 in all configurations This fixes the pod restart loop caused by liveness/readiness probes checking port 8080 while the app was listening on port 8086.
60 lines
1.6 KiB
Docker
60 lines
1.6 KiB
Docker
####
|
|
# Dockerfile pour UnionFlow Client - Compatible lionsctl
|
|
# Utilise l'uber-jar pré-compilé par Maven
|
|
####
|
|
|
|
FROM eclipse-temurin:17-jre-alpine
|
|
|
|
ENV LANGUAGE='en_US:en'
|
|
|
|
# Configuration Quarkus
|
|
ENV QUARKUS_PROFILE=prod
|
|
ENV QUARKUS_HTTP_PORT=8080
|
|
ENV QUARKUS_HTTP_HOST=0.0.0.0
|
|
|
|
# Configuration Backend UnionFlow
|
|
ENV UNIONFLOW_BACKEND_URL=https://lions.dev/unionflow
|
|
|
|
# Configuration Keycloak OIDC
|
|
ENV KEYCLOAK_AUTH_SERVER_URL=https://security.lions.dev/realms/unionflow
|
|
ENV KEYCLOAK_CLIENT_SECRET=unionflow-client-secret-2025
|
|
|
|
# Créer l'utilisateur appuser
|
|
RUN addgroup -g 185 appuser && adduser -D -u 185 -G appuser appuser
|
|
|
|
# Installer curl pour health checks
|
|
RUN apk add --no-cache curl
|
|
|
|
# Créer les répertoires nécessaires
|
|
RUN mkdir -p /app/logs /app/storage && chown -R appuser:appuser /app
|
|
|
|
WORKDIR /app
|
|
|
|
# Copier l'uber-jar depuis target/
|
|
COPY --chown=appuser:appuser target/*-runner.jar /app/app.jar
|
|
|
|
USER appuser
|
|
|
|
# Exposer le port 8080
|
|
EXPOSE 8080
|
|
|
|
# Variables JVM optimisées
|
|
ENV JAVA_OPTS="-Xmx1g -Xms512m \
|
|
-XX:+UseG1GC \
|
|
-XX:MaxGCPauseMillis=200 \
|
|
-XX:+UseStringDeduplication \
|
|
-XX:+HeapDumpOnOutOfMemoryError \
|
|
-XX:HeapDumpPath=/app/logs/heapdump.hprof \
|
|
-Djava.security.egd=file:/dev/./urandom \
|
|
-Djava.awt.headless=true \
|
|
-Dfile.encoding=UTF-8 \
|
|
-Djava.util.logging.manager=org.jboss.logmanager.LogManager \
|
|
-Dquarkus.profile=${QUARKUS_PROFILE}"
|
|
|
|
# Point d'entrée
|
|
ENTRYPOINT ["sh", "-c", "exec java $JAVA_OPTS -jar /app/app.jar"]
|
|
|
|
# Health check sur le bon port
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \
|
|
CMD curl -f http://localhost:8080/q/health/ready || exit 1
|