Aller au contenu principal

Vue d'ensemble DevOps

Documentation infrastructure et deploiement pour MyTelevision API v2.

Stack DevOps

OutilUsage
DockerContainerisation (multi-stage builds, profiles dev/staging/prod)
GitHub ActionsCI/CD (lint, test, build, security, quality gate)
Nginx 1.24.0Reverse proxy sur le serveur de production
CloudflareWAF, CDN, DNS, certificats TLS
PrometheusCollecte de metriques
GrafanaDashboards et visualisation
AlertmanagerRoutage et notifications d'alertes
LokiAgregation de logs
KubernetesOrchestration de conteneurs
HelmPackage manager Kubernetes

Architecture Infrastructure

                     Internet
|
[Cloudflare]
WAF / CDN
|
┌────────────────┐
│ Nginx 1.24.0 │
│ Reverse Proxy │
│ 185.246.87.50 │
│ (Ubuntu) │
└───────┬────────┘
|
+-------------+-------------+
| | |
[API Pod 1] [API Pod 2] [API Pod N]
NestJS :3000 NestJS :3000
| | |
+-------------+-------------+
|
+--------------+---------------+
| | |
[PostgreSQL] [Redis] [Cloudflare R2]
:5432 :6379 Storage

Environnements

EnvironnementInfrastructureURLObjectif
DevelopmentDocker locallocalhost:3000Developpement local
StagingDocker + Nginxstaging-api.mytelevision.appQA & Tests
ProductionDocker + Nginx + Cloudflareapi.mytelevision.appProduction

Serveur de production

ParametreValeur
IP185.246.87.50
OSUbuntu
Reverse ProxyNginx 1.24.0
CDN / WAFCloudflare

Commandes rapides

Docker local

# Demarrer tous les services
docker compose up -d

# Demarrer avec un profile specifique
docker compose --profile dev up -d
docker compose --profile staging up -d
docker compose --profile prod up -d

# Voir les logs
docker compose logs -f api

# Arreter
docker compose down

Deploy Staging

kubectl apply -k k8s/overlays/staging/

Deploy Production

helm upgrade mytv-api ./helm/mytv-api -f values-prod.yaml

SLA Targets

MetriqueTarget
Disponibilite99.9%
Latence P95< 500ms
Error Rate< 0.1%
RTO< 1h
RPO< 15min

Sections de la documentation DevOps

SectionDescription
DockerContainerisation, multi-stage builds, profiles et docker-compose
CI/CDPipelines GitHub Actions, pre-commit hooks, Dependabot
KubernetesDeploiement K8s, manifests, Helm charts, IaC Terraform
MonitoringPrometheus, Grafana, Alertmanager, metriques applicatives
LoggingLogging structure JSON, Loki, audit logs
SecretsGestion des secrets, rotation, bonnes pratiques