MàJ - Application.properties

This commit is contained in:
DahoudG
2025-09-22 21:01:08 +00:00
parent e5161c9ed8
commit 2f6e6e2f19
13 changed files with 1176 additions and 0 deletions

View File

@@ -0,0 +1,102 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: lionsdev-client-config
namespace: lions-apps
data:
# Production-specific application configuration
application.properties: |
# Quarkus Configuration
quarkus.application.name=lionsdev-client
quarkus.application.version=1.0.0
# HTTP Configuration - Production
quarkus.http.port=8080
quarkus.http.host=0.0.0.0
quarkus.http.cors=true
quarkus.http.cors.origins=https://lions.dev,https://www.lions.dev
# Database Configuration - Production
quarkus.datasource.db-kind=postgresql
quarkus.datasource.jdbc.url=jdbc:postgresql://postgresql-service.postgresql.svc.cluster.local:5432/lionsdb
quarkus.datasource.jdbc.max-size=50
quarkus.datasource.jdbc.min-size=10
quarkus.datasource.jdbc.acquisition-timeout=30
quarkus.datasource.jdbc.leak-detection-interval=10M
# Hibernate Configuration - Production
quarkus.hibernate-orm.database.generation=validate
quarkus.hibernate-orm.log.sql=false
quarkus.hibernate-orm.sql-load-script=no-file
quarkus.hibernate-orm.statistics=false
# Logging Configuration - Production
quarkus.log.level=INFO
quarkus.log.category."dev.lions".level=INFO
quarkus.log.category."org.hibernate".level=WARN
quarkus.log.category."io.quarkus".level=INFO
quarkus.log.console.enable=true
quarkus.log.console.format=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c{3.}] (%t) %s%e%n
quarkus.log.console.json=false
# Health Check Configuration
quarkus.health.extensions.enabled=true
quarkus.smallrye-health.root-path=/health
quarkus.smallrye-health.liveness-path=/health/live
quarkus.smallrye-health.readiness-path=/health/ready
quarkus.smallrye-health.startup-path=/health/started
# Metrics Configuration - Production
quarkus.micrometer.enabled=true
quarkus.micrometer.export.prometheus.enabled=true
quarkus.micrometer.export.prometheus.path=/metrics
quarkus.micrometer.binder.jvm=true
quarkus.micrometer.binder.system=true
quarkus.micrometer.binder.http-server.enabled=true
# OpenAPI Configuration - Production (disabled for security)
quarkus.swagger-ui.enable=false
quarkus.openapi.path=/api/openapi
mp.openapi.extensions.smallrye.info.title=Lions Dev Client API
mp.openapi.extensions.smallrye.info.version=1.0.0
mp.openapi.extensions.smallrye.info.description=Lions Dev professional website and client portal
mp.openapi.extensions.smallrye.info.contact.email=contact@lions.dev
mp.openapi.extensions.smallrye.info.contact.name=Lions Dev Team
mp.openapi.extensions.smallrye.info.contact.url=https://lions.dev
# Security Configuration - Production
quarkus.http.auth.basic=false
quarkus.security.jpa.enabled=false
quarkus.http.ssl.certificate.reload-period=24H
# Static Resources Configuration - Production
quarkus.http.static-resources."/"=META-INF/resources
quarkus.http.static-resources.cache-control=max-age=31536000, public, immutable
quarkus.http.enable-compression=true
# Performance Configuration
quarkus.thread-pool.core-threads=8
quarkus.thread-pool.max-threads=50
quarkus.thread-pool.queue-size=1000
# Production environment configuration
environment: "production"
domain: "lions.dev"
log-level: "INFO"
cluster: "k2"
# Lions Dev Production Configuration
lions.dev.company.name=Lions Dev
lions.dev.company.email=contact@lions.dev
lions.dev.company.phone=+225 01 01 75 95 25
lions.dev.company.address=Abidjan, Côte d'Ivoire
lions.dev.company.website=https://lions.dev
lions.dev.company.description=Enterprise digital transformation partner delivering mission-critical solutions across Africa
# Production feature flags
lions.dev.features.analytics.enabled=true
lions.dev.features.monitoring.enabled=true
lions.dev.features.contact-form.enabled=true
lions.dev.features.newsletter.enabled=true
lions.dev.features.debug.enabled=false
lions.dev.features.swagger.enabled=false

View File

@@ -0,0 +1,70 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: lionsdev-client
namespace: lions-apps
annotations:
deployment.kubernetes.io/environment: "production"
deployment.kubernetes.io/cluster: "k2"
deployment.kubernetes.io/domain: "lions.dev"
spec:
replicas: 3
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: "/metrics"
deployment.kubernetes.io/environment: "production"
spec:
containers:
- name: lionsdev-client
image: registry.lions.dev/lionsdev/lionsdev-client:latest
env:
- name: QUARKUS_PROFILE
value: "prod"
- name: ENVIRONMENT
value: "production"
- name: CLUSTER_NAME
value: "k2"
- name: DOMAIN
value: "lions.dev"
- name: JAVA_OPTS
value: "-Xms512m -Xmx1024m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+OptimizeStringConcat"
resources:
requests:
memory: "512Mi"
cpu: "300m"
limits:
memory: "1Gi"
cpu: "1000m"
livenessProbe:
httpGet:
path: /health/live
port: http
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 10
failureThreshold: 3
successThreshold: 1
readinessProbe:
httpGet:
path: /health/ready
port: http
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
startupProbe:
httpGet:
path: /health/started
port: http
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 60
successThreshold: 1

View File

@@ -0,0 +1,100 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: lionsdev-client-ingress
namespace: lions-apps
annotations:
# Production-specific Nginx configurations
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/use-regex: "true"
# SSL/TLS Configuration for Production
cert-manager.io/cluster-issuer: "letsencrypt-prod"
cert-manager.io/acme-challenge-type: "http01"
# Production performance optimizations
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "30"
nginx.ingress.kubernetes.io/proxy-send-timeout: "30"
nginx.ingress.kubernetes.io/proxy-read-timeout: "30"
nginx.ingress.kubernetes.io/proxy-buffering: "on"
nginx.ingress.kubernetes.io/proxy-buffer-size: "16k"
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
# Production caching strategy
nginx.ingress.kubernetes.io/server-snippet: |
# Static assets - long-term caching
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|webp|avif)$ {
expires 1y;
add_header Cache-Control "public, immutable";
add_header X-Content-Type-Options "nosniff";
add_header Vary "Accept-Encoding";
gzip_static on;
}
# HTML files - short-term caching
location ~* \.(html|htm)$ {
expires 1h;
add_header Cache-Control "public, must-revalidate";
add_header X-Content-Type-Options "nosniff";
add_header X-Frame-Options "DENY";
add_header X-XSS-Protection "1; mode=block";
add_header Referrer-Policy "strict-origin-when-cross-origin";
}
# API endpoints - no caching
location ~* ^/api/ {
expires -1;
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
}
# Production security headers
nginx.ingress.kubernetes.io/configuration-snippet: |
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com https://fonts.googleapis.com https://www.googletagmanager.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdnjs.cloudflare.com; font-src 'self' https://fonts.gstatic.com https://cdnjs.cloudflare.com; img-src 'self' data: https: blob:; connect-src 'self' https://www.google-analytics.com; frame-ancestors 'none'; base-uri 'self'; form-action 'self';" always;
add_header Permissions-Policy "geolocation=(), microphone=(), camera=(), payment=(), usb=(), magnetometer=(), gyroscope=(), speaker=(), fullscreen=(self)" always;
# Production rate limiting
nginx.ingress.kubernetes.io/rate-limit: "200"
nginx.ingress.kubernetes.io/rate-limit-window: "1m"
nginx.ingress.kubernetes.io/rate-limit-connections: "50"
# Production monitoring
nginx.ingress.kubernetes.io/enable-access-log: "true"
nginx.ingress.kubernetes.io/enable-rewrite-log: "false"
# Production redirect from www to non-www
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
spec:
tls:
- hosts:
- lions.dev
- www.lions.dev
secretName: lionsdev-client-tls-prod
rules:
- host: lions.dev
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: lionsdev-client-service
port:
number: 80
- host: www.lions.dev
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: lionsdev-client-service
port:
number: 80