Template parent pour l'architecture microservices RecipeYouLove avec CI/CD complet.
Ce repository sert de template parent pour tous les microservices de l'application RecipeYouLove. Il contient :
- Pipeline CI/CD complet (GitHub Actions)
- Configuration Docker et Kubernetes
- Tests d'intégration automatisés (Newman)
- Scripts de déploiement local
┌─────────────────────────────────────────────────────────┐
│ PARENT REPOSITORY │
│ (Template + CI/CD) │
└─────────────────────────────────────────────────────────┘
│
┌───────────────┼───────────────┐
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Microservice│ │ Microservice│ │ Microservice│
│ #1 │ │ #2 │ │ #3 │
│ (Fork) │ │ (Fork) │ │ (Fork) │
└─────────────┘ └─────────────┘ └─────────────┘
Chaque microservice :
- Fork ce repository parent
- Hérite du pipeline CI/CD
- Personnalise son code métier
- Partage la même infrastructure
# 1. Cloner le repository
git clone https://github.com/votre-org/RecipeYouLove.git
cd RecipeYouLove
# 2. Démarrer l'environnement complet
.\start-local-env.ps1
# 3. Accéder à l'application
# API : http://localhost:8080
# phpMyAdmin : http://localhost:8081
# MinIO : http://localhost:9001Consultez CONFIGURATION-MICROSERVICES.md pour les instructions complètes.
| Service | URL | Identifiants |
|---|---|---|
| API Spring Boot | http://localhost:8080 | - |
| phpMyAdmin | http://localhost:8081 | root / password |
| Mongo Express | http://localhost:8082 | admin / password |
| MinIO Console | http://localhost:9001 | minioadmin / minioadmin |
Les services déployés dans Minikube (GitHub Actions) sont uniquement pour les tests automatiques. Les URLs ne sont pas accessibles depuis l'extérieur.
1️⃣ Configuration & Variables
2️⃣ Build Maven
3️⃣ Check Code Coverage (80% minimum)
4️⃣ Build Docker Image
5️⃣ Check Image Security (Trivy)
6️⃣ Deploy to Kubernetes & Integration Tests (Newman)
7️⃣ Log Components URLs
- Push sur
main,develop,feat/**,fix/** - Pull Request vers
main,develop
- ✅ Tests unitaires
- ✅ Couverture de code
- ✅ Sécurité de l'image
- ✅ Tests d'intégration
- 📦 Artifacts (JAR, Docker image, rapports)
| Script | Description |
|---|---|
start-local-env.ps1 |
Démarrer l'environnement Docker Compose complet |
stop-local-env.ps1 |
Arrêter l'environnement |
test-newman-local.ps1 |
Exécuter les tests Newman localement |
quick-start.ps1 |
Build rapide et démarrage de l'app seule |
| Script | Description |
|---|---|
setup-argocd.ps1 |
Installer ArgoCD sur Kubernetes local |
setup-argocd-app.ps1 |
Configurer une application ArgoCD |
# 1. Builder l'image (IMPORTANT - sinon ErrImageNeverPull)
.\build-and-load-image.ps1
# 2. Installer ArgoCD (une fois, prend 3-5 min)
.\setup-argocd.ps1
# Mot de passe affiche dans le terminal
# 3. Configurer votre app
.\setup-argocd-app.ps1
# Entrer l'URL de votre repo Git
# 4. Interface Web
https://localhost:8080
# Login: admin / Password: (affiche a l'etape 2)1. Modifier code
2. .\build-and-load-image.ps1
3. git commit && git push
4. ArgoCD synchronise automatiquement (< 3 min)
5. Verifier: kubectl get pods -n soa-local
- ⏱️ ArgoCD prend 3-5 minutes à démarrer au premier lancement
- 🔑 Mot de passe admin : sauvegardé dans le terminal lors du setup
- 🐳 Image Docker : doit être buildée localement AVANT le déploiement
- 🔄 Sync automatique : max 3 minutes après un push Git
- README.md (ce fichier) - Vue d'ensemble et démarrage rapide
- GUIDE-DEVELOPPEUR.md - Guide complet développeur
- Setup environnement
- Tests (unitaires + Newman)
- ArgoCD : Setup, mot de passe, troubleshooting
- Pipeline CI/CD expliqué
- Debugging
- CONFIGURATION-MICROSERVICES.md - Configuration microservices fils
- Fork et personnalisation
- Configuration GitHub Actions
- Configuration Docker/Kubernetes
- ArgoCD pour microservices fils
- Récupération mot de passe ArgoCD
- Tests d'intégration
- Java 17+
- Maven 3.8+
- Docker Desktop (avec Kubernetes optionnel)
- PowerShell 5.1+
- Git
Rien à installer, tout est automatique !
.\start-local-env.ps1
# Ouvrir http://localhost:8080Voir CONFIGURATION-MICROSERVICES.md
Voir GUIDE-DEVELOPPEUR.md section "Pipeline CI/CD"
Modifier tests/newman/collection.json puis :
.\test-newman-local.ps1- Fork le repository
- Créer une branche :
git checkout -b feat/ma-fonctionnalite - Commit :
git commit -m "feat: ma fonctionnalité" - Push :
git push origin feat/ma-fonctionnalite - Créer une Pull Request
feat: nouvelle fonctionnalité
fix: correction de bug
docs: documentation
refactor: refactoring
test: ajout de tests
chore: tâches diverses
- Issues : https://github.com/votre-org/RecipeYouLove/issues
- Discussions : https://github.com/votre-org/RecipeYouLove/discussions
Ce projet est sous licence MIT. Voir LICENSE pour plus de détails.
# Démarrer tout en local
.\start-local-env.ps1
# Accéder
# http://localhost:8080 → API
# http://localhost:8081 → phpMyAdmin
# http://localhost:9001 → MinIO
# Arrêter
.\stop-local-env.ps1
# Créer un microservice → Lire CONFIGURATION-MICROSERVICES.md🎉 C'est tout !