Module 10 ⭐⭐⭐ Difficile ~4h

🐳 Conteneurisation & CI/CD Automatisé

Conteneuriser une application NestJS et mettre en place un pipeline CI/CD complet avec GitHub Actions. De git push au déploiement automatique en production.

📁 Fichiers à créer

project/
├── Dockerfile              ← Multi-stage (builder + runner Alpine)
├── .dockerignore
├── docker-compose.yml      ← Dev : API + Postgres + Redis + pgAdmin
├── docker-compose.prod.yml ← Prod : uniquement API + DB + Redis
├── .env.example            ← Template variables d'env documenté
├── .github/
│   └── workflows/
│       ├── ci.yml          ← lint + test + coverage
│       └── deploy.yml      ← build Docker + push GHCR + SSH deploy
└── src/
    └── health/
        └── health.controller.ts ← GET /health

✅ Checklist de déploiement

Bonus : Ajoutez un docker-compose.monitoring.yml avec Prometheus + Grafana pour monitorer l'API. Exposez les métriques avec @willsoto/nestjs-prometheus.
← Cours ✏️ Exercices 🧠 QCM NS10 🏆 Projet Final →