All checks were successful
CI/CD Pipeline / Backend - Build, Test & Push (push) Successful in 5m45s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 28m26s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Successful in 1s
CI/CD Pipeline / Deploy to Portainer (push) Successful in 14s
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Successful in 1s
179 lines
3.8 KiB
Markdown
179 lines
3.8 KiB
Markdown
# ✅ Portainer - Checklist de Déploiement Rapide
|
|
|
|
## 🎯 Avant de Déployer
|
|
|
|
### 1. Registry Configuré dans Portainer ✅
|
|
|
|
**Portainer → Registries → Vérifier** :
|
|
```
|
|
Name: Scaleway
|
|
Registry URL: rg.fr-par.scw.cloud/weworkstudio
|
|
Username: nologin
|
|
Password: [token Scaleway]
|
|
```
|
|
|
|
**Test** :
|
|
```bash
|
|
docker pull rg.fr-par.scw.cloud/weworkstudio/xpeditis-backend:preprod
|
|
# Devrait réussir
|
|
```
|
|
|
|
---
|
|
|
|
### 2. Images ARM64 Disponibles ✅
|
|
|
|
```bash
|
|
docker manifest inspect rg.fr-par.scw.cloud/weworkstudio/xpeditis-backend:preprod | grep architecture
|
|
|
|
# Devrait afficher :
|
|
# "architecture": "amd64"
|
|
# "architecture": "arm64" ← Important !
|
|
```
|
|
|
|
---
|
|
|
|
### 3. Network Traefik Existe ✅
|
|
|
|
```bash
|
|
docker network ls | grep traefik_network
|
|
|
|
# Si absent :
|
|
docker network create traefik_network
|
|
```
|
|
|
|
---
|
|
|
|
## 🚀 Déploiement
|
|
|
|
### 1. Copier la Stack
|
|
|
|
Copier tout le contenu de `docker/portainer-stack.yml`
|
|
|
|
### 2. Créer le Stack dans Portainer
|
|
|
|
1. **Portainer** → **Stacks** → **Add stack**
|
|
2. **Name** : `xpeditis-preprod`
|
|
3. **Web editor** : Coller le YAML
|
|
4. **Deploy the stack** → Attendre 2-3 min
|
|
|
|
### 3. Vérifier les Services
|
|
|
|
**Portainer → Stacks → xpeditis-preprod** :
|
|
|
|
- ✅ `xpeditis-db` → Running (Healthy)
|
|
- ✅ `xpeditis-redis` → Running
|
|
- ✅ `xpeditis-minio` → Running
|
|
- ✅ `xpeditis-backend` → Running (attendre ~30s)
|
|
- ✅ `xpeditis-frontend` → Running
|
|
|
|
---
|
|
|
|
## 🔍 Vérification Post-Déploiement
|
|
|
|
### Backend : Logs Migrations
|
|
|
|
**Portainer → Containers → xpeditis-backend → Logs** :
|
|
|
|
**Chercher ces lignes** :
|
|
```
|
|
✅ PostgreSQL is ready
|
|
✅ Successfully ran X migration(s)
|
|
✅ Database migrations completed
|
|
🚀 Starting NestJS application...
|
|
```
|
|
|
|
**Si absent** → Redémarrer le container backend.
|
|
|
|
---
|
|
|
|
### Frontend : Démarrage Next.js
|
|
|
|
**Portainer → Containers → xpeditis-frontend → Logs** :
|
|
|
|
**Chercher** :
|
|
```
|
|
▲ Next.js 14.5.0
|
|
✓ Ready in X.Xs
|
|
```
|
|
|
|
---
|
|
|
|
### Tester les Endpoints
|
|
|
|
```bash
|
|
# Backend API
|
|
curl https://api.preprod.xpeditis.com/api/v1/health
|
|
# Réponse attendue : {"status":"ok"}
|
|
|
|
# Frontend
|
|
curl -I https://app.preprod.xpeditis.com
|
|
# Réponse attendue : HTTP/2 200
|
|
|
|
# MinIO Console
|
|
curl -I https://minio.preprod.xpeditis.com
|
|
# Réponse attendue : HTTP/2 200
|
|
```
|
|
|
|
---
|
|
|
|
## ❌ Si Problèmes
|
|
|
|
### Erreur : "access denied"
|
|
```bash
|
|
# Sur le serveur Portainer
|
|
docker login rg.fr-par.scw.cloud/weworkstudio
|
|
# Username: nologin
|
|
# Password: [token]
|
|
```
|
|
|
|
### Erreur : "relation does not exist"
|
|
**Portainer → Containers → xpeditis-backend → Restart**
|
|
|
|
### Erreur : "network not found"
|
|
```bash
|
|
docker network create traefik_network
|
|
```
|
|
|
|
---
|
|
|
|
## 🔄 Update des Images (CI/CD Push)
|
|
|
|
Quand la CI/CD push de nouvelles images :
|
|
|
|
1. **Portainer → Stacks → xpeditis-preprod**
|
|
2. ✅ **Cocher "Re-pull image and redeploy"**
|
|
3. **Update the stack**
|
|
|
|
---
|
|
|
|
## 📊 URLs de Vérification
|
|
|
|
| URL | Attendu |
|
|
|-----|---------|
|
|
| https://api.preprod.xpeditis.com/api/v1/health | `{"status":"ok"}` |
|
|
| https://api.preprod.xpeditis.com/api/docs | Swagger UI |
|
|
| https://app.preprod.xpeditis.com | Page d'accueil |
|
|
| https://minio.preprod.xpeditis.com | MinIO Console |
|
|
|
|
---
|
|
|
|
## ✅ Checklist Finale
|
|
|
|
- [ ] Registry Scaleway configuré dans Portainer
|
|
- [ ] Images ARM64 dans le registry (tag `preprod`)
|
|
- [ ] Network `traefik_network` créé
|
|
- [ ] Stack déployé dans Portainer
|
|
- [ ] 5 services en état "running"
|
|
- [ ] Logs backend : migrations OK ✅
|
|
- [ ] API health : `200 OK`
|
|
- [ ] Frontend : `200 OK`
|
|
- [ ] MinIO : `200 OK`
|
|
|
|
**Si tous ✅ → Déploiement réussi ! 🎉**
|
|
|
|
---
|
|
|
|
**Temps estimé** : 10 minutes (si registry configuré)
|
|
**Difficulté** : ⚡ Facile
|
|
**Documentation complète** : [PORTAINER_DEPLOY_FINAL.md](PORTAINER_DEPLOY_FINAL.md)
|