🚀 Release v1.1.0 - Application en Production avec Monitoring

 Nouvelles fonctionnalités:
- 🌐 Application déployée et accessible en ligne (http://141.253.118.141:3000)
- 📊 Dashboard Grafana complet avec métriques en temps réel
- 🚀 Configuration de production avec docker-compose.prod.yml
- 🏗️ Infrastructure robuste avec monitoring Prometheus + Grafana
- 📈 Métriques personnalisées (CPU, mémoire, requêtes, réservations)

🔧 Améliorations techniques:
- Backend FastAPI avec métriques Prometheus intégrées
- Configuration Docker optimisée pour la production
- Health checks pour tous les services
- Variables d'environnement sécurisées
- Configuration Ansible pour déploiement automatisé

📚 Documentation:
- README complet mis à jour avec liens de production
- CHANGELOG détaillé pour la version 1.1.0
- Notes de release complètes
- Guide de déploiement en production

🎯 Statut: Stable, déployé et accessible en ligne
This commit is contained in:
Rassaby Ludovic
2025-10-17 15:05:09 +04:00
parent 5a879b7db1
commit 35cad7998d
17 changed files with 1223 additions and 761 deletions
@@ -0,0 +1,681 @@
{
"dashboard": {
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"max": 1,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"editorMode": "code",
"expr": "up{job=\"dockezr-backend\"}",
"instant": false,
"range": true,
"refId": "A"
}
],
"title": "Backend Status",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"max": 1,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 6,
"y": 0
},
"id": 2,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"editorMode": "code",
"expr": "up{job=\"prometheus\"}",
"instant": false,
"range": true,
"refId": "A"
}
],
"title": "Prometheus Status",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 70
},
{
"color": "red",
"value": 90
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 12,
"y": 0
},
"id": 3,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"editorMode": "code",
"expr": "rate(process_cpu_seconds_total[5m]) * 100",
"instant": false,
"range": true,
"refId": "A"
}
],
"title": "CPU Usage (Backend Process)",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"max": 1000000000,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 500000000
},
{
"color": "red",
"value": 800000000
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 18,
"y": 0
},
"id": 4,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"editorMode": "code",
"expr": "process_resident_memory_bytes",
"instant": false,
"range": true,
"refId": "A"
}
],
"title": "Memory Usage (Backend)",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"vis": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "reqps"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 6
},
"id": 5,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"editorMode": "code",
"expr": "rate(http_requests_total[5m])",
"instant": false,
"range": true,
"refId": "A"
}
],
"title": "HTTP Requests per Second",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"vis": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 6
},
"id": 6,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"editorMode": "code",
"expr": "histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))",
"instant": false,
"range": true,
"refId": "A"
}
],
"title": "Response Time (95th percentile)",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"vis": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 14
},
"id": 7,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"editorMode": "code",
"expr": "up",
"instant": false,
"range": true,
"refId": "A"
}
],
"title": "Status de tous les services",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"vis": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 14
},
"id": 8,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "cf1b2w1g4tkaob"
},
"editorMode": "code",
"expr": "process_resident_memory_bytes",
"instant": false,
"range": true,
"refId": "A"
}
],
"title": "Memory Usage (Backend Process)",
"type": "timeseries"
}
],
"refresh": "5s",
"schemaVersion": 36,
"style": "dark",
"tags": [
"dockezr",
"final",
"monitoring"
],
"templating": {
"list": []
},
"time": {
"from": "now-15m",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Dockezr - Monitoring Complet",
"uid": "dockezr-final",
"version": 1,
"weekStart": ""
}
}
@@ -1,98 +0,0 @@
{
"dashboard": {
"id": null,
"title": "Dockezr - Vue d'ensemble",
"tags": ["dockezr", "monitoring"],
"style": "dark",
"timezone": "browser",
"panels": [
{
"id": 1,
"title": "État des services",
"type": "stat",
"targets": [
{
"expr": "up{job=\"dockezr-backend\"}",
"legendFormat": "Backend FastAPI"
},
{
"expr": "up{job=\"dockezr-frontend\"}",
"legendFormat": "Frontend Next.js"
},
{
"expr": "up{job=\"dockezr-database\"}",
"legendFormat": "Base de données"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"steps": [
{
"color": "red",
"value": 0
},
{
"color": "green",
"value": 1
}
]
}
}
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
}
},
{
"id": 2,
"title": "Requêtes par seconde - Backend",
"type": "graph",
"targets": [
{
"expr": "rate(http_requests_total{job=\"dockezr-backend\"}[5m])",
"legendFormat": "RPS"
}
],
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
}
},
{
"id": 3,
"title": "Temps de réponse - Backend",
"type": "graph",
"targets": [
{
"expr": "histogram_quantile(0.95, rate(http_request_duration_seconds_bucket{job=\"dockezr-backend\"}[5m]))",
"legendFormat": "95th percentile"
},
{
"expr": "histogram_quantile(0.50, rate(http_request_duration_seconds_bucket{job=\"dockezr-backend\"}[5m]))",
"legendFormat": "50th percentile"
}
],
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 8
}
}
],
"time": {
"from": "now-1h",
"to": "now"
},
"refresh": "30s"
}
}
@@ -3,7 +3,16 @@ apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
uid: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
editable: true
version: 1
orgId: 1
jsonData:
httpMethod: POST
queryTimeout: 60s
timeInterval: 5s
manageAlerts: true
alertmanagerUid: alertmanager
+26 -17
View File
@@ -1,39 +1,48 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_interval: 30s
evaluation_interval: 30s
external_labels:
cluster: 'dockezr-prod'
environment: 'production'
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
# - "dockezr_rules.yml"
scrape_configs:
# Prometheus lui-même
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
scrape_interval: 30s
metrics_path: '/metrics'
# Backend FastAPI avec métriques
# Backend FastAPI avec métriques personnalisées
- job_name: 'dockezr-backend'
static_configs:
- targets: ['backend:8000']
metrics_path: '/metrics'
scrape_interval: 10s
scrape_timeout: 5s
scrape_interval: 30s
scrape_timeout: 10s
honor_labels: true
# Base de données PostgreSQL (via postgres_exporter si ajouté)
# Node Exporter pour métriques système du serveur
- job_name: 'node-exporter'
static_configs:
- targets: ['141.253.118.141:9100']
scrape_interval: 30s
scrape_timeout: 10s
honor_labels: true
# Base de données PostgreSQL (pour monitoring futur)
- job_name: 'dockezr-database'
static_configs:
- targets: ['db:5432']
scrape_interval: 30s
scrape_interval: 60s
scrape_timeout: 10s
# Frontend Next.js (métriques de base)
# Frontend Next.js (pour monitoring futur)
- job_name: 'dockezr-frontend'
static_configs:
- targets: ['frontend:3000']
scrape_interval: 30s
# Node Exporter pour métriques système (optionnel)
- job_name: 'node-exporter'
static_configs:
- targets: ['node-exporter:9100']
scrape_interval: 15s
scrape_interval: 60s
scrape_timeout: 10s