replace cadvisor for otelcollector docker_stats plugin, use docker socket proxy for otelcollector
This commit is contained in:
1 parent
0747dda9e7
commit
887668dde9
7 files changed
+590
-508
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Infrastructure qpismont.fr
|
||||
|
||||
Infrastructure self-hosted complète hébergée sur serveur dédié, fournissant une plateforme DevOps avec Git, CI/CD, reverse proxy, VPN et monitoring.
|
||||
Infrastructure self-hosted complète hébergée sur serveur dédié, fournissant une plateforme DevOps avec Git, CI/CD, reverse proxy, VPN et observabilité.
|
||||
|
||||
**Domaine :** qpismont.fr
|
||||
**Stack :** Docker Swarm
|
||||
@@ -14,35 +14,53 @@ Cette infrastructure héberge l'ensemble des services nécessaires pour le déve
|
||||
|
||||
- **Hébergement Git** avec interface web (Gitea)
|
||||
- **CI/CD automatisé** pour builds et déploiements (Woodpecker)
|
||||
- **Agent IA de review** de code sur webhooks Gitea (Herald)
|
||||
- **Reverse proxy** avec HTTPS automatique (Caddy)
|
||||
- **Accès VPN sécurisé** pour l'administration (WireGuard)
|
||||
- **Monitoring** des services et ressources (Prometheus + Perses)
|
||||
- **Backups automatisés** quotidiens vers serveur FTP
|
||||
- **Accès VPN sécurisé** pour l'administration (WireGuard + CoreDNS)
|
||||
- **Observabilité** : métriques, traces et dashboards (Prometheus, Tempo, Perses)
|
||||
- **Alerting** temps réel avec notifications push (Alertmanager + ntfy)
|
||||
|
||||
---
|
||||
|
||||
## Services déployés
|
||||
|
||||
### Production
|
||||
### Stack `core`
|
||||
|
||||
| Service | Version | Description | URL |
|
||||
|---------|---------|-------------|-----|
|
||||
| **Gitea** | 1.24.7 | Hébergement Git (alternative GitHub) | https://gitea.qpismont.fr |
|
||||
| **Woodpecker CI** | 3.11.0 | Plateforme CI/CD (fork de Drone) | https://woodpecker.qpismont.fr |
|
||||
| **Caddy** | 2-alpine | Reverse proxy + HTTPS automatique | - |
|
||||
| **WireGuard** | latest | Serveur VPN pour accès distant | UDP:51820 |
|
||||
| **Prometheus** | 3.7.2 | Collecte de métriques | (interne) |
|
||||
| **Perses** | latest | Dashboards de monitoring | (via VPN) |
|
||||
| **cAdvisor** | latest | Métriques des containers | (interne) |
|
||||
| **Backup** | latest | Sauvegarde quotidienne (4h00) | (interne) |
|
||||
| Service | Image | Description | Exposition |
|
||||
|---------|-------|-------------|------------|
|
||||
| **reverse_caddy** | `caddy:2.11-alpine` | Reverse proxy, HTTPS auto, HTTP/3 | `80`, `443/tcp`, `443/udp` |
|
||||
| **wireguard_server** | `linuxserver/wireguard:latest` | VPN d'accès distant + CoreDNS | `51820/udp` |
|
||||
|
||||
### Stack `git`
|
||||
|
||||
| Service | Image | Description | URL |
|
||||
|---------|-------|-------------|-----|
|
||||
| **gitea** | `docker.gitea.com/gitea:28.2` | Hébergement Git | https://gitea.qpismont.fr · https://git.qpismont.fr |
|
||||
| **woodpecker_server** | `woodpeckerci/woodpecker-server:v3.19-alpine` | Serveur CI/CD | https://woodpecker.qpismont.fr |
|
||||
| **woodpecker_agent** | `woodpeckerci/woodpecker-agent:v3.19-alpine` | Agent d'exécution (Docker socket) | (interne) |
|
||||
| **herald** | `tintounn/herald:1.2` | Agent IA de review sur webhooks Gitea (Docker socket) | (interne, métriques `:9100`) |
|
||||
|
||||
### Stack `observability`
|
||||
|
||||
| Service | Image | Description | Exposition |
|
||||
|---------|-------|-------------|------------|
|
||||
| **prometheus** | `prom/prometheus:v3.13.3` | TSDB + remote-write receiver | (interne) |
|
||||
| **otel-collector** | `otel/opentelemetry-collector-contrib:0.164.0` | Collecte métriques + traces | (interne) |
|
||||
| **docker-proxy-otel** | `tecnativa/docker-socket-proxy:0.4.0` | Proxy socket Docker (lecture seule) | (interne) |
|
||||
| **tempo** | `grafana/tempo:3.0.3` | Stockage de traces (OTLP) | (interne) |
|
||||
| **perses** | `persesdev/perses:latest` | Dashboards | (via VPN) |
|
||||
| **alertmanager** | `prom/alertmanager:v0.34.1` | Routage des alertes | (interne) |
|
||||
| **blackbox_exporter** | `prom/blackbox-exporter:v0.28.0` | Probes HTTP externes | (interne) |
|
||||
| **ntfy** | `binwiederhier/ntfy:latest` | Notifications push | https://ntfy.qpismont.fr |
|
||||
|
||||
### Configuration
|
||||
|
||||
- **Timezone** : Europe/Paris
|
||||
- **OAuth** : Gitea ↔ Woodpecker intégré
|
||||
- **Admin** : qpismont
|
||||
- **Backup retention** : 14 jours
|
||||
- **Monitoring scrape** : 10 secondes
|
||||
- **Scrape interval** : 10 secondes
|
||||
- **Rétention Tempo** : 48 h
|
||||
- **Rétention Prometheus** : par défaut (15 j), volume persistant
|
||||
|
||||
---
|
||||
|
||||
@@ -58,57 +76,63 @@ Cette infrastructure héberge l'ensemble des services nécessaires pour le déve
|
||||
▼ ▼ ▼
|
||||
[Caddy Proxy] [HTTP/3] [WireGuard VPN]
|
||||
│ │
|
||||
┌───────────┼──────────┐ │
|
||||
│ │ │ │
|
||||
gitea:3000 woodpecker:8000 │ [Perses]
|
||||
│ │
|
||||
www.qpismont.fr [Prometheus]
|
||||
(désactivé) │
|
||||
[cAdvisor]
|
||||
┌───────────┼───────────┬──────────┐ │
|
||||
│ │ │ │ │
|
||||
gitea:3000 woodpecker:8000 │ ntfy:80│
|
||||
│ │
|
||||
www.qpismont.fr [CoreDNS]
|
||||
(portfolio) │
|
||||
[Perses]
|
||||
[Prometheus]
|
||||
[Tempo]
|
||||
|
||||
┌──────────────────────────────────────────────────────────────┐
|
||||
│ CI/CD Pipeline │
|
||||
│ Stack git (CI/CD) │
|
||||
│ │
|
||||
│ [Gitea] ←──── OAuth ────→ [Woodpecker Server] │
|
||||
│ │ │
|
||||
│ ▼ │
|
||||
│ [Woodpecker Agent] │
|
||||
│ │ │
|
||||
│ ▼ │
|
||||
│ │ │ │
|
||||
│ │ webhook ▼ │
|
||||
│ ▼ [Woodpecker Agent] │
|
||||
│ [Herald] │ │
|
||||
│ (review IA) ▼ │
|
||||
│ [Docker-in-Docker] │
|
||||
│ (build containers) │
|
||||
└──────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌──────────────────────────────────────────────────────────────┐
|
||||
│ Monitoring Stack │
|
||||
│ Stack observability │
|
||||
│ │
|
||||
│ [Prometheus] ←─ scrape ─┬─ prometheus:9090 (self) │
|
||||
│ │ ├─ reverse_caddy:2019 (metrics) │
|
||||
│ │ └─ cadvisor:8080 (containers) │
|
||||
│ │ │
|
||||
│ └──→ [Perses] (visualisation via VPN) │
|
||||
└──────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌──────────────────────────────────────────────────────────────┐
|
||||
│ Backup System │
|
||||
│ │
|
||||
│ [Backup Service] ──→ rclone/FTP ──→ [Serveur FTP distant] │
|
||||
│ │ │ │
|
||||
│ └─ Volumes Docker: └─ /backups/infra/│
|
||||
│ • giteadata Format: .tar.gz │
|
||||
│ • woodpeckerdata (désactivé) Rétention: 14j │
|
||||
│ • caddy configs (désactivé) Cron: 4h00 │
|
||||
│ • wireguard (désactivé) │
|
||||
│ [OTel Collector] ──┬─ hostmetrics (CPU/RAM/disk/net) │
|
||||
│ │ ├─ docker_stats (métriques containers) │
|
||||
│ │ ├─ prometheus scrape: │
|
||||
│ │ │ reverse_caddy:2019 │
|
||||
│ │ │ herald:9100 │
|
||||
│ │ │ alertmanager:9093 │
|
||||
│ │ │ blackbox_exporter:9115 │
|
||||
│ │ └─ OTLP (4318) │
|
||||
│ │ │
|
||||
│ ├── remote_write ──→ [Prometheus] ──→ [Perses] │
|
||||
│ └── OTLP ──────────→ [Tempo] │
|
||||
│ │ │
|
||||
│ [Prometheus] ── alertes ──→ [Alertmanager] ──→ [ntfy] │
|
||||
└──────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### Stacks Docker Swarm
|
||||
|
||||
| Stack | Fichier compose | Services |
|
||||
|-------|-----------------|----------|
|
||||
| `core` | `docker-compose.core.yml` | Caddy, WireGuard |
|
||||
| `git` | `docker-compose.git.yml` | Gitea, Woodpecker (server + agent), Herald |
|
||||
| `observability` | `docker-compose.observability.yml` | Prometheus, Perses, Tempo, Alertmanager, Blackbox, OTel Collector, proxy socket, ntfy |
|
||||
|
||||
### Réseaux Docker Swarm
|
||||
|
||||
| Réseau | Type | Services |
|
||||
|--------|------|----------|
|
||||
| `reverse` | overlay | Caddy, Gitea, Woodpecker |
|
||||
| `wireguard_network` | overlay | WireGuard, Perses |
|
||||
| `prometheus_network` | overlay | Prometheus, Perses, cAdvisor, Caddy, Backup |
|
||||
| `reverse_network` | overlay | Caddy, Gitea, Woodpecker (server + agent), Herald, ntfy |
|
||||
| `wireguard_network` | overlay | WireGuard, Prometheus, Perses, Tempo |
|
||||
| `prometheus_network` | overlay | Caddy, Herald, Prometheus, Perses, Tempo, Alertmanager, Blackbox, OTel Collector, docker-proxy-otel, ntfy |
|
||||
|
||||
---
|
||||
|
||||
@@ -121,7 +145,7 @@ Cette infrastructure héberge l'ensemble des services nécessaires pour le déve
|
||||
- **Docker Configs** pour configurations versionnées
|
||||
|
||||
### Infrastructure as Code
|
||||
- Configuration : `docker-compose.yml`
|
||||
- Configuration : `docker-compose.core.yml` (Caddy, WireGuard), `docker-compose.git.yml` (Gitea, Woodpecker, Herald), `docker-compose.observability.yml` (Prometheus, Perses, Tempo, ntfy…)
|
||||
- Déploiement : `./deploy.sh` (génère timestamp pour versioning)
|
||||
- Contexte Docker distant : `prod`
|
||||
|
||||
@@ -132,21 +156,21 @@ Cette infrastructure héberge l'ensemble des services nécessaires pour le déve
|
||||
- **VPN** : WireGuard pour services internes
|
||||
|
||||
### Storage
|
||||
- **Volumes Docker** : giteadata, woodpeckerdata, reversecaddydata, reversecaddyconfig, backuptemp
|
||||
- **Host mounts** : /home/user/wireguard-config, /var/run/docker.sock (CI/CD)
|
||||
- **Volumes Docker** : `reversecaddydata`, `reversecaddyconfig` (core) · `giteadata`, `woodpeckerdata` (git) · `prometheusdata`, `tempodata`, `persesdata`, `alertmanagerdata`, `ntfydata` (observability)
|
||||
- **Host mounts** : `/home/user/wireguard-config`, `/lib/modules` (WireGuard) · `/var/run/docker.sock` (Woodpecker agent, Herald, `docker-proxy-otel`) · `/` en lecture seule (OTel Collector)
|
||||
|
||||
### Monitoring
|
||||
- **Métriques** : Prometheus avec 10s scrape interval
|
||||
- **Collecte** : OTel Collector (hostmetrics + scrape Prometheus + OTLP)
|
||||
- **Stockage métriques** : Prometheus (remote-write receiver activé)
|
||||
- **Stockage traces** : Tempo (OTLP HTTP `:4318`, rétention 48 h)
|
||||
- **Dashboards** : Perses (accessible via VPN)
|
||||
- **Container metrics** : cAdvisor
|
||||
- **Proxy metrics** : Caddy admin API (:2019)
|
||||
- **Container metrics** : receiver `docker_stats` de l'OTel Collector (labels Swarm `service_name` / `task_name`)
|
||||
- **Proxy metrics** : Caddy admin API (`:2019`)
|
||||
- **Probes externes** : blackbox_exporter (`http_2xx` sur les URLs publiques)
|
||||
- **Alerting** : Prometheus → Alertmanager → ntfy (`http://ntfy:80/alerts`)
|
||||
|
||||
### Backups
|
||||
- **Solution** : docker-volume-backup avec rclone
|
||||
- **Fréquence** : Quotidien à 4h00
|
||||
- **Destination** : Serveur FTP distant
|
||||
- **Rétention** : 14 jours
|
||||
- **Format** : .tar.gz compressé
|
||||
- ⚠️ **Aucun service de backup n'est déployé actuellement.** L'ancien service `docker-volume-backup` a été retiré (commit `041eb51`). Les sauvegardes sont à refaire manuellement ou à réintroduire.
|
||||
|
||||
---
|
||||
|
||||
@@ -166,6 +190,13 @@ Cette infrastructure héberge l'ensemble des services nécessaires pour le déve
|
||||
- Limite : 1 workflow concurrent, CPU core 1
|
||||
- Support multi-architectures
|
||||
|
||||
### Herald
|
||||
- Agent IA de review de code, déclenché par webhooks Gitea
|
||||
- Modèle via OpenRouter (`openai/gpt-5.6-luna-pro`)
|
||||
- Sandbox d'exécution limitée à 32 itérations
|
||||
- 5 jobs concurrents max, timeout Gitea 60 s / OpenRouter 600 s
|
||||
- Métriques Prometheus exposées sur `:9100`
|
||||
|
||||
### Caddy
|
||||
- HTTPS automatique avec Let's Encrypt
|
||||
- HTTP/3 (QUIC) support
|
||||
@@ -177,38 +208,44 @@ Cette infrastructure héberge l'ensemble des services nécessaires pour le déve
|
||||
- VPN moderne et rapide
|
||||
- Configuration : 1 peer (extensible)
|
||||
- Accès sécurisé aux services internes
|
||||
- CoreDNS embarqué pour résoudre `perses.internal`, `prometheus.internal`, `tempo.internal`
|
||||
- Faible overhead
|
||||
|
||||
### Monitoring
|
||||
- **Prometheus** : Collecte et stockage des métriques
|
||||
- **Perses** : Visualisation moderne (alternative Grafana)
|
||||
- **cAdvisor** : Métriques CPU, RAM, I/O des containers
|
||||
- **OTel Collector** : hostmetrics (CPU, RAM, disque, réseau, load, process) + `docker_stats` (métriques containers) + scrape Prometheus + réception OTLP
|
||||
- **Prometheus** : stockage des métriques, remote-write receiver
|
||||
- **Tempo** : stockage des traces OTLP
|
||||
- **Perses** : visualisation moderne (alternative Grafana)
|
||||
- **blackbox_exporter** : probes HTTP sur les URLs publiques
|
||||
- **Alertmanager** : routage des alertes vers ntfy
|
||||
- Scrape automatique toutes les 10 secondes
|
||||
|
||||
### Backups
|
||||
- Sauvegarde automatique quotidienne
|
||||
- Support FTP/SFTP via rclone
|
||||
- Compression gzip
|
||||
- Notifications optionnelles (Discord, Slack, Email)
|
||||
- Rétention configurable
|
||||
### Alerting
|
||||
- Règles : `ServiceDown` (probe blackbox), `OtelCollectorDown`, `CaddyDown`
|
||||
- Seuil : 1 minute
|
||||
- Inhibition : `CaddyDown` supprime les `ServiceDown` (évite le bruit)
|
||||
- Notification : webhook ntfy avec template `alertmanager`, `send_resolved: true`
|
||||
|
||||
---
|
||||
|
||||
## URLs et accès
|
||||
|
||||
### Services publics
|
||||
- **Gitea** : https://gitea.qpismont.fr
|
||||
- **Gitea** : https://gitea.qpismont.fr (alias https://git.qpismont.fr)
|
||||
- **Woodpecker** : https://woodpecker.qpismont.fr
|
||||
- **Portfolio** : ~~https://www.qpismont.fr~~ (désactivé)
|
||||
- **Portfolio** : https://www.qpismont.fr (`qpismont.fr` redirige vers `www`)
|
||||
- **ntfy** : https://ntfy.qpismont.fr
|
||||
|
||||
### Services internes (VPN requis)
|
||||
- **Perses** : http://perses:8080 (via WireGuard)
|
||||
- **Prometheus** : http://prometheus:9090 (via WireGuard)
|
||||
- **Perses** : http://perses.internal:8080 (via WireGuard/CoreDNS)
|
||||
- **Prometheus** : http://prometheus.internal:9090
|
||||
- **Tempo** : http://tempo.internal:3200
|
||||
- **Caddy Admin** : http://reverse_caddy:2019 (métriques)
|
||||
|
||||
### VPN
|
||||
- **Protocole** : WireGuard
|
||||
- **Port** : 51820/udp
|
||||
- **Sous-réseau** : `10.13.13.0/24`
|
||||
- **Config** : `/home/user/wireguard-config/peer1/`
|
||||
|
||||
---
|
||||
@@ -221,12 +258,12 @@ Le déploiement se fait via un contexte Docker distant vers le serveur de produc
|
||||
./deploy.sh
|
||||
```
|
||||
|
||||
Le script génère un timestamp pour versionner les configs et secrets, puis déploie le stack `core` sur le contexte `prod`.
|
||||
Le script génère un timestamp pour versionner les configs et secrets, puis déploie les trois stacks (`core`, `git`, `observability`) sur le contexte `prod`.
|
||||
|
||||
**Prérequis :**
|
||||
- Contexte Docker `prod` configuré
|
||||
- Réseaux overlay créés (`reverse`, `wireguard_network`, `prometheus_network`)
|
||||
- Secrets configurés dans `./secrets/`
|
||||
- Réseaux overlay créés (`reverse_network`, `wireguard_network`, `prometheus_network`)
|
||||
- Secrets configurés dans `./secrets/` (dossier ignoré par Git)
|
||||
|
||||
---
|
||||
|
||||
@@ -234,156 +271,30 @@ Le script génère un timestamp pour versionner les configs et secrets, puis dé
|
||||
|
||||
### Secrets Docker
|
||||
|
||||
| Secret | Usage |
|
||||
|--------|-------|
|
||||
| `woodpecker_agent_secret` | Communication server/agent Woodpecker |
|
||||
| `woodpecker_gitea_client` | OAuth client ID Gitea |
|
||||
| `woodpecker_gitea_secret` | OAuth client secret Gitea |
|
||||
| `backup_ftp_config` | Configuration rclone pour FTP |
|
||||
| Secret | Fichier source | Usage |
|
||||
|--------|----------------|-------|
|
||||
| `woodpecker_agent_secret` | `./secrets/woodpecker_agent_secret` | Communication server/agent Woodpecker |
|
||||
| `woodpecker_gitea_client` | `./secrets/woodpecker_gitea_client` | OAuth client ID Gitea |
|
||||
| `woodpecker_gitea_secret` | `./secrets/woodpecker_gitea_secret` | OAuth client secret Gitea |
|
||||
| `herald_gitea_token` | `./secrets/herald/herald_gitea_token` | Token API Gitea pour Herald |
|
||||
| `herald_openrouter_token` | `./secrets/herald/herald_openrouter_token` | Clé API OpenRouter |
|
||||
| `herald_gitea_header_secret` | `./secrets/herald/herald_gitea_header_secret` | Vérification signature webhook Gitea |
|
||||
| `herald_sentry_dsn` | `./secrets/herald/herald_sentry_dsn` | DSN Sentry |
|
||||
|
||||
### Configs Docker
|
||||
|
||||
| Config | Fichier source |
|
||||
|--------|----------------|
|
||||
| `caddy_config` | `./Caddyfile` |
|
||||
| `prometheus_config` | `./prometheus.yml` |
|
||||
| Config | Fichier source | Stack |
|
||||
|--------|----------------|-------|
|
||||
| `caddy_config` | `./Caddyfile` | core |
|
||||
| `caddy_portfolio_html` | `./portfolio/index.html` | core |
|
||||
| `wireguard_coredns_config` | `./wireguard/CoreDns` | core |
|
||||
| `prometheus_config` | `./prometheus/prometheus.yml` | observability |
|
||||
| `prometheus_rules_config` | `./prometheus/alert.rules.yml` | observability |
|
||||
| `alertmanager_config` | `./prometheus/alertmanager/alertmanager.yml` | observability |
|
||||
| `blackbox_config` | `./blackbox/blackbox.yml` | observability |
|
||||
| `otel_collector_config` | `./otel-collector/config.yaml` | observability |
|
||||
| `tempo_config` | `./tempo/tempo.yml` | observability |
|
||||
|
||||
Les configs et secrets sont versionnés avec `${DATETIME}` pour forcer les mises à jour lors du déploiement.
|
||||
Les configs et secrets sont versionnés avec `${DATETIME}` pour forcer les mises à jour lors du déploiement. Ils s'accumulent donc à chaque déploiement : voir la section [Nettoyage](#nettoyage).
|
||||
|
||||
---
|
||||
|
||||
## Problèmes connus
|
||||
|
||||
### ⚠️ Service my_cv désactivé
|
||||
Le Caddyfile contient des routes vers `my_cv:80` mais le service n'existe plus dans docker-compose.yml (retiré dans commit f047317).
|
||||
|
||||
**Impact :** Routes `qpismont.fr` et `www.qpismont.fr` ne fonctionnent pas.
|
||||
|
||||
### ⚠️ Prometheus non-persistant
|
||||
Prometheus n'a pas de volume Docker, les métriques sont perdues à chaque redémarrage du container.
|
||||
|
||||
**Impact :** Pas d'historique des métriques sur le long terme.
|
||||
|
||||
### ⚠️ Volumes backup partiellement désactivés
|
||||
Seul `giteadata` est actuellement sauvegardé. Les autres volumes (woodpecker, caddy, wireguard) sont commentés dans docker-compose.yml.
|
||||
|
||||
**Impact :** Perte de données possible en cas d'incident sur ces volumes.
|
||||
|
||||
---
|
||||
|
||||
## Documentation
|
||||
|
||||
### Fichiers de documentation
|
||||
|
||||
- **[README.md](./README.md)** : Ce fichier - présentation générale
|
||||
- **[ANALYSE.md](./ANALYSE.md)** : Analyse détaillée de l'infrastructure + recommandations d'amélioration
|
||||
- **[BACKUP.md](./BACKUP.md)** : Documentation complète du système de backup (configuration, utilisation, restauration)
|
||||
|
||||
### Documentation externe
|
||||
|
||||
- [Docker Swarm](https://docs.docker.com/engine/swarm/)
|
||||
- [Caddy](https://caddyserver.com/docs/)
|
||||
- [Gitea](https://docs.gitea.io/)
|
||||
- [Woodpecker CI](https://woodpecker-ci.org/docs/)
|
||||
- [WireGuard](https://www.wireguard.com/)
|
||||
- [Prometheus](https://prometheus.io/docs/)
|
||||
- [Perses](https://perses.dev/docs/)
|
||||
|
||||
---
|
||||
|
||||
## Maintenance
|
||||
|
||||
### Routine
|
||||
|
||||
- **Quotidien** : Backup automatique à 4h00
|
||||
- **Hebdomadaire** : Vérification logs et backups
|
||||
- **Mensuel** : Mise à jour des images Docker
|
||||
- **Trimestriel** : Test de restauration des backups
|
||||
|
||||
### Monitoring
|
||||
|
||||
```bash
|
||||
# Status des services
|
||||
docker --context prod ps
|
||||
|
||||
# Logs d'un service
|
||||
docker --context prod logs -f $(docker --context prod ps -q -f name=core_SERVICE)
|
||||
|
||||
# Métriques système
|
||||
docker --context prod stats
|
||||
```
|
||||
|
||||
### Mises à jour
|
||||
|
||||
Modifier les versions dans `docker-compose.yml` puis :
|
||||
|
||||
```bash
|
||||
./deploy.sh
|
||||
```
|
||||
|
||||
Docker Swarm appliquera les changements de manière progressive.
|
||||
|
||||
---
|
||||
|
||||
## Sécurité
|
||||
|
||||
### Mesures en place
|
||||
|
||||
✅ HTTPS automatique (Let's Encrypt)
|
||||
✅ Secrets Docker (credentials chiffrés)
|
||||
✅ Network isolation (3 réseaux séparés)
|
||||
✅ VPN pour services internes (WireGuard)
|
||||
✅ Resource limits sur CI/CD agent
|
||||
✅ Backups automatisés quotidiens
|
||||
✅ Non-root user pour Gitea (UID 1000)
|
||||
|
||||
### Recommandations
|
||||
|
||||
Voir [ANALYSE.md](./ANALYSE.md) pour la liste complète des améliorations de sécurité suggérées.
|
||||
|
||||
---
|
||||
|
||||
## Historique
|
||||
|
||||
### 2025-10-27
|
||||
- ✅ Upgrade vers Debian 13 (devcontainer)
|
||||
- ✅ Update Woodpecker v3.11.0
|
||||
- ✅ Update Gitea v1.24.7
|
||||
- ✅ Ajout WireGuard VPN
|
||||
- ✅ Ajout stack monitoring (Prometheus + Perses + cAdvisor)
|
||||
- ✅ Ajout système de backup automatique
|
||||
|
||||
### 2025-06-23
|
||||
- ✅ Retrait service my_cv (portfolio)
|
||||
- ✅ Update images Woodpecker et Gitea
|
||||
|
||||
### Antérieur
|
||||
- Déploiement devcontainer Debian
|
||||
- Upgrades réguliers des services
|
||||
- Ajout Woodpecker CI
|
||||
- Migration vers Docker Swarm
|
||||
|
||||
---
|
||||
|
||||
## Statistiques
|
||||
|
||||
- **Services actifs** : 8
|
||||
- **Réseaux overlay** : 3
|
||||
- **Volumes Docker** : 5
|
||||
- **Secrets Docker** : 4
|
||||
- **Configs Docker** : 2
|
||||
- **Ports exposés** : 4 (80, 443/tcp, 443/udp, 51820/udp)
|
||||
- **Backup size** : ~50-500 MB (dépend des données Gitea)
|
||||
- **Uptime target** : 99%+
|
||||
|
||||
---
|
||||
|
||||
## Licence et Auteur
|
||||
|
||||
**Propriétaire** : qpismont
|
||||
**Usage** : Personnel
|
||||
**Repository** : https://gitea.qpismont.fr/qpismont/infra
|
||||
|
||||
---
|
||||
|
||||
**Dernière mise à jour :** 27 octobre 2025
|
||||
Reference in new issue
Block a user