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:
24
.lionsctl.yaml
Normal file
24
.lionsctl.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
# Configuration lionsctl pour unionflow-client
|
||||
deployment:
|
||||
replicas: 1
|
||||
domain: unionflow.lions.dev
|
||||
port: 8086
|
||||
environment: production
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: "1Gi"
|
||||
requests:
|
||||
cpu: "200m"
|
||||
memory: "512Mi"
|
||||
|
||||
health:
|
||||
liveness:
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 10
|
||||
port: 8086
|
||||
readiness:
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 5
|
||||
port: 8086
|
||||
59
Dockerfile
Normal file
59
Dockerfile
Normal 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
|
||||
Reference in New Issue
Block a user