Add: Dockerfile et configuration lionsctl pour déploiement production

- Ajout du Dockerfile avec configuration port 8086
- Configuration des variables d'environnement Keycloak et backend
- Ajout de .lionsctl.yaml avec domaine unionflow.lions.dev
- Health checks configurés pour le bon port (8086)
- Replicas: 1 comme demandé

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
dahoud
2025-12-12 22:58:50 +00:00
parent 50a9b089a4
commit 3ffcb2f38a
2 changed files with 83 additions and 0 deletions

59
Dockerfile Normal file
View File

@@ -0,0 +1,59 @@
####
# 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=8086
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 8086
EXPOSE 8086
# 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:8086/q/health/ready || exit 1