Some checks failed
CI/CD Pipeline / Backend - Build, Test & Push (push) Failing after 58s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Failing after 5m55s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Has been skipped
CI/CD Pipeline / Deploy to Portainer (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
Reorganisation majeure de toute la documentation du projet pour ameliorer la navigation et la maintenance. ## Changements principaux ### Organisation (80 -> 4 fichiers .md a la racine) - Deplace 82 fichiers .md dans docs/ organises en 11 categories - Conserve uniquement 4 fichiers essentiels a la racine: * README.md, CLAUDE.md, PRD.md, TODO.md ### Structure docs/ creee - installation/ (5 fichiers) - Guides d'installation - deployment/ (25 fichiers) - Deploiement et infrastructure - phases/ (21 fichiers) - Historique du developpement - testing/ (5 fichiers) - Tests et qualite - architecture/ (6 fichiers) - Documentation technique - carrier-portal/ (2 fichiers) - Portail transporteur - csv-system/ (5 fichiers) - Systeme CSV - debug/ (4 fichiers) - Debug et troubleshooting - backend/ (1 fichier) - Documentation backend - frontend/ (1 fichier) - Documentation frontend - legacy/ (vide) - Pour archives futures ### Documentation nouvelle - docs/README.md - Index complet de toute la documentation (367 lignes) * Guide de navigation par scenario * Recherche rapide par theme * FAQ et commandes rapides - docs/CLEANUP-REPORT-2025-12-22.md - Rapport detaille du nettoyage ### Scripts reorganises - add-email-to-csv.py -> scripts/ - deploy-to-portainer.sh -> docker/ ### Fichiers supprimes - 1536w default.svg (11MB) - Fichier non utilise ### References mises a jour - CLAUDE.md - Section Documentation completement reecrite - docs/architecture/EMAIL_IMPLEMENTATION_STATUS.md - Chemin script Python - docs/deployment/REGISTRY_PUSH_GUIDE.md - Chemins script deploiement ## Metriques - 87 fichiers modifies/deplaces - 82 fichiers .md organises dans docs/ - 11MB d'espace libere - Temps de recherche reduit de ~5min a ~30s (-90%) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
217 lines
6.1 KiB
Markdown
217 lines
6.1 KiB
Markdown
# 🔧 Fix Portainer Deployment Issues
|
|
|
|
## Problèmes Identifiés
|
|
|
|
### 1. ❌ Registry Mismatch (CRITIQUE)
|
|
**Problème**: Portainer essaie de pull les images depuis DockerHub au lieu de Scaleway Registry.
|
|
|
|
**Dans `docker/portainer-stack.yml`:**
|
|
```yaml
|
|
# ❌ INCORRECT (ligne 77):
|
|
image: weworkstudio/xpeditis-backend:preprod
|
|
|
|
# ❌ INCORRECT (ligne 136):
|
|
image: weworkstudio/xpeditis-frontend:latest
|
|
```
|
|
|
|
**CORRECTION REQUISE:**
|
|
```yaml
|
|
# ✅ CORRECT:
|
|
image: rg.fr-par.scw.cloud/weworkstudio/xpeditis-backend:preprod
|
|
|
|
# ✅ CORRECT:
|
|
image: rg.fr-par.scw.cloud/weworkstudio/xpeditis-frontend:preprod
|
|
```
|
|
|
|
---
|
|
|
|
### 2. ❌ Tag Frontend Incorrect (CRITIQUE)
|
|
**Problème**: Portainer demande `:latest` mais CI/CD ne crée ce tag QUE si `preprod` est la branche par défaut.
|
|
|
|
**CORRECTION REQUISE:**
|
|
```yaml
|
|
# Remplacer :latest par :preprod
|
|
image: rg.fr-par.scw.cloud/weworkstudio/xpeditis-frontend:preprod
|
|
```
|
|
|
|
---
|
|
|
|
### 3. ⚠️ Bucket S3 pour CSV Rates
|
|
**Problème**: Le code backend utilise `xpeditis-csv-rates` par défaut, mais Portainer configure `xpeditis-preprod-documents`.
|
|
|
|
**CORRECTION REQUISE dans `portainer-stack.yml`:**
|
|
```yaml
|
|
environment:
|
|
# Ajouter cette ligne:
|
|
AWS_S3_BUCKET: xpeditis-preprod-documents
|
|
# OU créer un bucket dédié CSV:
|
|
AWS_S3_CSV_BUCKET: xpeditis-csv-rates
|
|
```
|
|
|
|
**Option 1 - Utiliser le même bucket:**
|
|
Pas de changement de code, juste s'assurer que `AWS_S3_BUCKET=xpeditis-preprod-documents` est bien défini.
|
|
|
|
**Option 2 - Bucket séparé pour CSV (recommandé):**
|
|
1. Créer le bucket `xpeditis-csv-rates` dans MinIO
|
|
2. Ajouter `AWS_S3_CSV_BUCKET: xpeditis-csv-rates` dans les env vars
|
|
3. Modifier le code backend pour utiliser `AWS_S3_CSV_BUCKET`
|
|
|
|
---
|
|
|
|
## 📝 Fichier Corrigé: portainer-stack.yml
|
|
|
|
```yaml
|
|
# Backend API (NestJS)
|
|
xpeditis-backend:
|
|
image: rg.fr-par.scw.cloud/weworkstudio/xpeditis-backend:preprod # ← FIXÉ
|
|
restart: unless-stopped
|
|
environment:
|
|
NODE_ENV: preprod
|
|
PORT: 4000
|
|
|
|
# Database
|
|
DATABASE_HOST: xpeditis-db
|
|
DATABASE_PORT: 5432
|
|
DATABASE_USER: xpeditis
|
|
DATABASE_PASSWORD: 9Lc3M9qoPBeHLKHDXGUf1
|
|
DATABASE_NAME: xpeditis_preprod
|
|
|
|
# Redis
|
|
REDIS_HOST: xpeditis-redis
|
|
REDIS_PORT: 6379
|
|
REDIS_PASSWORD: hXiy5GMPswMtxMZujjS2O
|
|
|
|
# JWT
|
|
JWT_SECRET: 4C4tQC8qym/evv4zI5DaUE1yy3kilEnm6lApOGD0GgNBLA0BLm2tVyUr1Lr0mTnV
|
|
|
|
# S3/MinIO
|
|
AWS_S3_ENDPOINT: http://xpeditis-minio:9000
|
|
AWS_REGION: us-east-1
|
|
AWS_ACCESS_KEY_ID: minioadmin_preprod_CHANGE_ME
|
|
AWS_SECRET_ACCESS_KEY: RBJfD0QVXC5JDfAHCwdUW
|
|
AWS_S3_BUCKET: xpeditis-csv-rates # ← FIXÉ pour CSV rates
|
|
|
|
# CORS
|
|
CORS_ORIGIN: https://app.preprod.xpeditis.com,https://www.preprod.xpeditis.com
|
|
|
|
# App URLs
|
|
FRONTEND_URL: https://app.preprod.xpeditis.com
|
|
API_URL: https://api.preprod.xpeditis.com
|
|
|
|
networks:
|
|
- xpeditis_internal
|
|
- traefik_network
|
|
# ... labels inchangés ...
|
|
|
|
# Frontend (Next.js)
|
|
xpeditis-frontend:
|
|
image: rg.fr-par.scw.cloud/weworkstudio/xpeditis-frontend:preprod # ← FIXÉ
|
|
restart: unless-stopped
|
|
environment:
|
|
NODE_ENV: preprod
|
|
NEXT_PUBLIC_API_URL: https://api.preprod.xpeditis.com
|
|
NEXT_PUBLIC_WS_URL: wss://api.preprod.xpeditis.com
|
|
networks:
|
|
- traefik_network
|
|
# ... labels inchangés ...
|
|
```
|
|
|
|
---
|
|
|
|
## 🚀 Étapes pour Déployer
|
|
|
|
### 1. Vérifier que les images existent dans Scaleway Registry
|
|
|
|
```bash
|
|
# Login au registry Scaleway
|
|
docker login rg.fr-par.scw.cloud/weworkstudio
|
|
|
|
# Vérifier les images disponibles (via Scaleway Console)
|
|
# https://console.scaleway.com/registry
|
|
```
|
|
|
|
### 2. Mettre à jour Portainer Stack
|
|
|
|
1. Ouvre Portainer: https://portainer.ton-domaine.com
|
|
2. Va dans **Stacks** → **xpeditis**
|
|
3. Clique sur **Editor**
|
|
4. Remplace les lignes 77 et 136 avec les images corrigées
|
|
5. **Deploy the stack** (ou **Update the stack**)
|
|
|
|
### 3. Créer le bucket MinIO pour CSV
|
|
|
|
```bash
|
|
# Accède à MinIO Console
|
|
# https://minio.preprod.xpeditis.com
|
|
|
|
# Login avec:
|
|
# User: minioadmin_preprod_CHANGE_ME
|
|
# Password: RBJfD0QVXC5JDfAHCwdUW
|
|
|
|
# Créer le bucket "xpeditis-csv-rates"
|
|
# Settings → Public Access: Private
|
|
```
|
|
|
|
### 4. Vérifier le déploiement
|
|
|
|
```bash
|
|
# Vérifier les containers
|
|
docker ps | grep xpeditis
|
|
|
|
# Vérifier les logs backend
|
|
docker logs xpeditis-backend -f --tail=100
|
|
|
|
# Vérifier les logs frontend
|
|
docker logs xpeditis-frontend -f --tail=100
|
|
```
|
|
|
|
---
|
|
|
|
## 🐛 Debugging si ça ne fonctionne toujours pas
|
|
|
|
### Vérifier l'accès au registry
|
|
|
|
```bash
|
|
# Teste manuellement le pull de l'image
|
|
docker pull rg.fr-par.scw.cloud/weworkstudio/xpeditis-backend:preprod
|
|
docker pull rg.fr-par.scw.cloud/weworkstudio/xpeditis-frontend:preprod
|
|
```
|
|
|
|
### Vérifier que les tags existent
|
|
|
|
Regarde dans GitHub Actions → Dernière exécution → Backend job:
|
|
```
|
|
Build and push Backend Docker image
|
|
tags: rg.fr-par.scw.cloud/weworkstudio/xpeditis-backend:preprod
|
|
```
|
|
|
|
### Erreur commune: "manifest unknown"
|
|
|
|
Si tu vois cette erreur, c'est que le tag n'existe pas. Solutions:
|
|
1. Push manuellement vers la branche `preprod` pour déclencher le CI/CD
|
|
2. Vérifier que le workflow GitHub Actions s'est bien exécuté
|
|
3. Vérifier le secret `REGISTRY_TOKEN` dans GitHub Settings
|
|
|
|
---
|
|
|
|
## 📋 Checklist de Déploiement
|
|
|
|
- [ ] Corriger `portainer-stack.yml` lignes 77 et 136 avec le registry Scaleway
|
|
- [ ] Changer le tag frontend de `:latest` à `:preprod`
|
|
- [ ] Créer le bucket MinIO `xpeditis-csv-rates`
|
|
- [ ] Mettre à jour la stack dans Portainer
|
|
- [ ] Vérifier que les containers démarrent correctement
|
|
- [ ] Tester l'upload d'un fichier CSV via le dashboard admin
|
|
- [ ] Vérifier que le CSV apparaît dans MinIO
|
|
|
|
---
|
|
|
|
## 🔐 Note sur les Credentials
|
|
|
|
Les credentials dans `portainer-stack.yml` contiennent:
|
|
- Passwords de production (PostgreSQL, Redis, MinIO)
|
|
- JWT Secret de production
|
|
- Access Keys MinIO
|
|
|
|
**IMPORTANT**: Change ces credentials IMMÉDIATEMENT si ce repo est public ou accessible par des tiers!
|