338 lines
9.1 KiB
Markdown
338 lines
9.1 KiB
Markdown
# 📝 Résumé du Déploiement AfterWork
|
|
|
|
**Date** : 2026-01-10
|
|
**Version** : 1.0.0
|
|
|
|
---
|
|
|
|
## ✅ Ce qui a été réalisé
|
|
|
|
### 🔧 Backend API
|
|
|
|
#### Déploiement Production
|
|
- ✅ **API déployée** sur VPS (176.57.150.2)
|
|
- ✅ **Namespace** : `applications`
|
|
- ✅ **Service** : `mic-after-work-server-impl-quarkus-main-service`
|
|
- ✅ **Image Docker** : `registry.lions.dev/lionsdev/mic-after-work-server-impl-quarkus-main:1.0.0-SNAPSHOT-20260110-161333`
|
|
- ✅ **Base de données** : PostgreSQL (`lionsuser@postgresql:5432/mic-after-work-server-impl-quarkus-main`)
|
|
|
|
#### Configuration Corrigée
|
|
- ✅ Supprimé tous les warnings de configuration Quarkus
|
|
- ✅ Propriétés obsolètes multipart remplacées par `quarkus.http.limits.max-body-size`
|
|
- ✅ Séparation correcte des propriétés build-time et runtime
|
|
- ✅ Configuration datasource PostgreSQL pour le build
|
|
|
|
#### Ingress Configuré
|
|
- ✅ **URL publique** : `https://api.lions.dev/afterwork`
|
|
- ✅ **Certificat TLS** : `api-lions-dev-tls` (Let's Encrypt)
|
|
- ✅ **CORS** : Configuré et fonctionnel
|
|
- ✅ **WebSocket** : Support activé
|
|
- ✅ **Compression** : Activée
|
|
- ✅ **Rate limiting** : 1000 req/min
|
|
|
|
#### Endpoints Disponibles
|
|
|
|
| Endpoint | Description | URL |
|
|
|----------|-------------|-----|
|
|
| Users | Gestion utilisateurs | `https://api.lions.dev/afterwork/users` |
|
|
| Auth | Authentification | `https://api.lions.dev/afterwork/users/authenticate` |
|
|
| Events | Événements | `https://api.lions.dev/afterwork/events` |
|
|
| Friends | Amis | `https://api.lions.dev/afterwork/friends` |
|
|
| Messages | Messagerie | `https://api.lions.dev/afterwork/messages` |
|
|
| Posts | Posts sociaux | `https://api.lions.dev/afterwork/posts` |
|
|
| Stories | Stories | `https://api.lions.dev/afterwork/stories` |
|
|
| Swagger UI | Documentation API | `https://api.lions.dev/afterwork/q/swagger-ui/` |
|
|
|
|
#### WebSockets
|
|
|
|
| Endpoint | Description | URL |
|
|
|----------|-------------|-----|
|
|
| Chat | Chat temps réel | `wss://api.lions.dev/afterwork/chat/ws/{userId}` |
|
|
| Notifications | Notifications temps réel | `wss://api.lions.dev/afterwork/notifications/ws/{userId}` |
|
|
|
|
---
|
|
|
|
### 📱 Frontend Flutter
|
|
|
|
#### Scripts de Build Créés
|
|
- ✅ **PowerShell** : `scripts/build_production.ps1`
|
|
- ✅ **Bash** : `scripts/build_production.sh`
|
|
- ✅ Support multi-plateforme : APK, App Bundle, iOS, Web
|
|
|
|
#### Configuration Production
|
|
- ✅ **API URL** : `https://api.lions.dev/afterwork` (configurée via `--dart-define`)
|
|
- ✅ **Environment** : `production`
|
|
- ✅ **Debug Mode** : Désactivé en production
|
|
|
|
#### Documentation
|
|
- ✅ `BUILD_CONFIG.md` : Guide complet de build
|
|
- ✅ `.env.example` : Exemple de configuration
|
|
- ✅ Instructions détaillées pour chaque plateforme
|
|
|
|
---
|
|
|
|
## 🚀 Utilisation
|
|
|
|
### Backend (déjà déployé)
|
|
|
|
L'API est **déjà en production** et accessible à :
|
|
```
|
|
https://api.lions.dev/afterwork
|
|
```
|
|
|
|
**Test rapide** :
|
|
```bash
|
|
curl https://api.lions.dev/afterwork/users
|
|
# Retourne: []
|
|
```
|
|
|
|
### Frontend (à builder pour Play Store)
|
|
|
|
#### Build APK Production
|
|
|
|
**Windows** :
|
|
```powershell
|
|
.\scripts\build_production.ps1
|
|
```
|
|
|
|
**Linux/Mac** :
|
|
```bash
|
|
chmod +x scripts/build_production.sh
|
|
./scripts/build_production.sh
|
|
```
|
|
|
|
**Sortie** : `build/app/outputs/flutter-apk/app-release.apk`
|
|
|
|
#### Build App Bundle (pour Google Play)
|
|
|
|
**Windows** :
|
|
```powershell
|
|
.\scripts\build_production.ps1 -Platform appbundle
|
|
```
|
|
|
|
**Linux/Mac** :
|
|
```bash
|
|
./scripts/build_production.sh appbundle
|
|
```
|
|
|
|
**Sortie** : `build/app/outputs/bundle/release/app-release.aab`
|
|
|
|
---
|
|
|
|
## 📊 État des Composants
|
|
|
|
| Composant | État | URL/Localisation |
|
|
|-----------|------|------------------|
|
|
| Backend API | ✅ Running | `https://api.lions.dev/afterwork` |
|
|
| Base de données | ✅ Connected | `postgresql:5432` |
|
|
| Ingress | ✅ Active | `api.lions.dev/afterwork` |
|
|
| WebSocket Chat | ✅ Active | `wss://api.lions.dev/afterwork/chat/ws/{userId}` |
|
|
| WebSocket Notifs | ✅ Active | `wss://api.lions.dev/afterwork/notifications/ws/{userId}` |
|
|
| Swagger UI | ✅ Active | `https://api.lions.dev/afterwork/q/swagger-ui/` |
|
|
| Frontend Config | ✅ Ready | Scripts de build disponibles |
|
|
|
|
---
|
|
|
|
## 📁 Fichiers Importants
|
|
|
|
### Backend
|
|
```
|
|
mic-after-work-server-impl-quarkus-main/
|
|
├── src/main/resources/
|
|
│ ├── application.properties # Config build-time + dev
|
|
│ └── application-prod.properties # Config runtime production
|
|
├── kubernetes/
|
|
│ ├── afterwork-deployment.yaml # Deployment K8s
|
|
│ ├── afterwork-service.yaml # Service K8s
|
|
│ ├── afterwork-ingress.yaml # Ingress K8s
|
|
│ ├── afterwork-configmap.yaml # ConfigMap
|
|
│ └── afterwork-secrets.yaml # Secrets
|
|
├── Dockerfile # Image Docker
|
|
└── pom.xml # Configuration Maven
|
|
```
|
|
|
|
### Frontend
|
|
```
|
|
afterwork/
|
|
├── lib/core/constants/
|
|
│ └── env_config.dart # Configuration centralisée
|
|
├── scripts/
|
|
│ ├── build_production.ps1 # Script build Windows
|
|
│ └── build_production.sh # Script build Linux/Mac
|
|
├── BUILD_CONFIG.md # Documentation build
|
|
└── .env.example # Exemple configuration
|
|
```
|
|
|
|
---
|
|
|
|
## 🔐 Secrets et Configuration
|
|
|
|
### Backend (déjà configurés en production)
|
|
|
|
**ConfigMap** :
|
|
```yaml
|
|
DB_HOST: postgresql
|
|
DB_PORT: 5432
|
|
DB_NAME: mic-after-work-server-impl-quarkus-main
|
|
```
|
|
|
|
**Secrets** :
|
|
```yaml
|
|
DB_USERNAME: lionsuser
|
|
DB_PASSWORD: LionsUser2025!
|
|
```
|
|
|
|
### Frontend (à définir au build)
|
|
|
|
**Dart Defines** :
|
|
```bash
|
|
--dart-define=API_BASE_URL=https://api.lions.dev/afterwork
|
|
--dart-define=ENVIRONMENT=production
|
|
```
|
|
|
|
---
|
|
|
|
## 🧪 Tests de Validation
|
|
|
|
### Backend
|
|
|
|
```bash
|
|
# Test API accessible
|
|
curl https://api.lions.dev/afterwork/users
|
|
# Attendu: []
|
|
|
|
# Test CORS
|
|
curl -H "Origin: https://afterwork.lions.dev" \
|
|
-H "Access-Control-Request-Method: GET" \
|
|
-X OPTIONS \
|
|
https://api.lions.dev/afterwork/users
|
|
# Attendu: Headers CORS présents
|
|
|
|
# Test Swagger UI
|
|
curl -I https://api.lions.dev/afterwork/q/swagger-ui/
|
|
# Attendu: HTTP 302 Found
|
|
```
|
|
|
|
### Frontend
|
|
|
|
1. Builder l'APK de production
|
|
2. Installer sur un appareil Android
|
|
3. Vérifier que l'app se connecte à `https://api.lions.dev/afterwork`
|
|
4. Tester l'authentification
|
|
5. Tester les WebSockets (chat, notifications)
|
|
|
|
---
|
|
|
|
## 📚 Documentation Complète
|
|
|
|
- **Backend** : `DATABASE_CONFIG.md` - Configuration base de données
|
|
- **Frontend** : `BUILD_CONFIG.md` - Guide de build complet
|
|
- **API** : `https://api.lions.dev/afterwork/q/swagger-ui/` - Documentation interactive
|
|
|
|
---
|
|
|
|
## 🔄 Pipeline de Déploiement
|
|
|
|
### Backend (automatisé via lionsctl)
|
|
|
|
```bash
|
|
cd mic-after-work-server-impl-quarkus-main
|
|
lionsctl.exe pipeline \
|
|
--cluster k1 \
|
|
--url https://git.lions.dev/lionsdev/mic-after-work-server-impl-quarkus-main.git \
|
|
--environment production \
|
|
--branch develop
|
|
```
|
|
|
|
**Étapes automatiques** :
|
|
1. Clone du repository
|
|
2. Build Maven (uber-jar)
|
|
3. Build Docker image
|
|
4. Push vers registry.lions.dev
|
|
5. Déploiement Kubernetes
|
|
6. Health check
|
|
|
|
### Frontend (manuel pour Play Store)
|
|
|
|
1. **Build** :
|
|
```bash
|
|
./scripts/build_production.sh appbundle
|
|
```
|
|
|
|
2. **Sign** : Signer l'App Bundle avec votre keystore
|
|
|
|
3. **Upload** : Télécharger sur Google Play Console
|
|
|
|
4. **Release** : Publier sur Play Store
|
|
|
|
---
|
|
|
|
## 🎯 Prochaines Étapes
|
|
|
|
### Immédiat
|
|
- [ ] Tester l'API depuis Postman/Insomnia
|
|
- [ ] Créer des utilisateurs de test
|
|
- [ ] Vérifier les WebSockets avec un client WS
|
|
|
|
### Court Terme (Play Store)
|
|
- [ ] Builder l'App Bundle de production
|
|
- [ ] Signer l'application
|
|
- [ ] Créer un compte Google Play Console
|
|
- [ ] Préparer les assets (icônes, captures d'écran)
|
|
- [ ] Soumettre l'application
|
|
|
|
### Moyen Terme
|
|
- [ ] Configurer CI/CD pour le backend (Jenkins/GitLab CI)
|
|
- [ ] Mettre en place des tests automatisés
|
|
- [ ] Configurer les backups automatiques
|
|
- [ ] Monitoring et alertes (Prometheus/Grafana)
|
|
|
|
---
|
|
|
|
## 🆘 Support et Aide
|
|
|
|
### En cas de problème
|
|
|
|
**Backend** :
|
|
```bash
|
|
# Voir les logs
|
|
ssh root@176.57.150.2 "kubectl logs -n applications -l app=mic-after-work-server-impl-quarkus-main --tail=100"
|
|
|
|
# Redémarrer le pod
|
|
ssh root@176.57.150.2 "kubectl rollout restart -n applications deployment/mic-after-work-server-impl-quarkus-main"
|
|
|
|
# Vérifier le statut
|
|
ssh root@176.57.150.2 "kubectl get pods -n applications -l app=mic-after-work-server-impl-quarkus-main"
|
|
```
|
|
|
|
**Frontend** :
|
|
- Consultez `BUILD_CONFIG.md` section "Dépannage"
|
|
- Vérifiez que l'API est accessible
|
|
- Reconstruisez avec `--clean`
|
|
|
|
---
|
|
|
|
## 📞 Contacts
|
|
|
|
- **Repository Backend** : https://git.lions.dev/lionsdev/mic-after-work-server-impl-quarkus-main
|
|
- **Repository Frontend** : https://git.lions.dev/lionsdev/afterwork
|
|
- **API Production** : https://api.lions.dev/afterwork
|
|
- **Documentation API** : https://api.lions.dev/afterwork/q/swagger-ui/
|
|
|
|
---
|
|
|
|
## ✨ Résumé Final
|
|
|
|
**✅ Backend déployé et fonctionnel en production**
|
|
**✅ Frontend prêt pour le build Play Store**
|
|
**✅ Documentation complète disponible**
|
|
**✅ Scripts automatisés pour faciliter le déploiement**
|
|
|
|
🎉 **Tout est prêt pour le déploiement sur Play Store !**
|
|
|
|
---
|
|
|
|
**Dernière mise à jour** : 2026-01-10
|
|
**Version Backend** : 1.0.0-SNAPSHOT
|
|
**Version Frontend** : 1.0.0
|