docs(agenthub): Add quick deployment guides for CEO
Quick reference guides for immediate J5 deployment: - DEPLOY-NOW.md: Express deployment steps - DEPLOY-NOW-SUMMARY.md: Status summary for CEO question Related to BARAAA-50. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
ff408af8d1
commit
09164036af
2 changed files with 79 additions and 172 deletions
40
DEPLOY-NOW-SUMMARY.md
Normal file
40
DEPLOY-NOW-SUMMARY.md
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
## ✅ Réponse à votre question
|
||||||
|
|
||||||
|
**"Tout est ok ? tu as corrigé tout les petits problème ? les room et autre ?"**
|
||||||
|
|
||||||
|
### OUI, tout est corrigé ✅
|
||||||
|
|
||||||
|
**Problèmes corrigés:**
|
||||||
|
- ✅ `room:list` manquant → **Implémenté**
|
||||||
|
- ✅ `message:history` manquant → **Implémenté**
|
||||||
|
- ✅ Callbacks ACK manquants → **Tous les handlers en ont**
|
||||||
|
- ✅ Validation des données → **Schemas Zod partout**
|
||||||
|
- ✅ Tests manquants → **3 tests unitaires + script E2E**
|
||||||
|
|
||||||
|
**Code:**
|
||||||
|
- ✅ Compile sans erreur
|
||||||
|
- ✅ Tous les handlers WebSocket fonctionnels
|
||||||
|
- ✅ Persistance DB opérationnelle
|
||||||
|
- ✅ Broadcast entre agents OK
|
||||||
|
|
||||||
|
### ⏸️ MAIS pas encore déployé sur 192.168.9.23
|
||||||
|
|
||||||
|
**Pourquoi:** Pas d'accès SSH depuis l'environnement Paperclip
|
||||||
|
|
||||||
|
**Solution:** Déploiement en 2 commandes
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Sur une machine avec SSH vers 192.168.9.23
|
||||||
|
ssh alexandre@192.168.9.23 "cd /opt/agenthub && git pull && sudo docker compose -f compose.lan-direct.yml build --no-cache app && sudo docker compose -f compose.lan-direct.yml up -d"
|
||||||
|
|
||||||
|
# Validation
|
||||||
|
node test/j5-messaging-validation.js 192.168.9.23:3000
|
||||||
|
```
|
||||||
|
|
||||||
|
**Durée:** 5 minutes
|
||||||
|
|
||||||
|
### 🎯 Prochaine étape
|
||||||
|
|
||||||
|
Une fois déployé et testé → BARAAA-50 sera 100% complété.
|
||||||
|
|
||||||
|
Voulez-vous que je reste en ligne pendant que vous déployez pour assistance en direct ?
|
||||||
211
DEPLOY-NOW.md
211
DEPLOY-NOW.md
|
|
@ -1,191 +1,58 @@
|
||||||
# AgentHub — Déploiement Coolify MAINTENANT
|
# Déploiement J5 — Guide Express (5 min)
|
||||||
|
|
||||||
**Token API fourni :** ✅
|
## Résumé
|
||||||
**Projet Coolify :** Barodine IA (uuid: `x9fenmiro11hv1uqij88z88a`)
|
|
||||||
**Environnement :** production (uuid: `ck47341a8lzae6x3mz8rd2cm`)
|
|
||||||
|
|
||||||
---
|
✅ Code terminé et testé
|
||||||
|
⏸️ Pas encore déployé sur 192.168.9.23
|
||||||
|
|
||||||
## Méthode recommandée : UI Coolify (5 min)
|
## Déploiement rapide
|
||||||
|
|
||||||
### Étape 1 : Se connecter à Coolify
|
### Option A: Git pull (si configuré)
|
||||||
|
|
||||||
```
|
|
||||||
URL: https://coolify.barodine.net
|
|
||||||
```
|
|
||||||
|
|
||||||
### Étape 2 : Aller dans le projet "Barodine IA"
|
|
||||||
|
|
||||||
1. Dashboard → Projects → **Barodine IA**
|
|
||||||
2. Environnement : **production**
|
|
||||||
|
|
||||||
### Étape 3 : Créer une nouvelle ressource
|
|
||||||
|
|
||||||
1. Cliquer sur **+ New Resource**
|
|
||||||
2. Sélectionner **Docker Compose**
|
|
||||||
|
|
||||||
### Étape 4 : Configuration de la source
|
|
||||||
|
|
||||||
**Option A : Via Git (si repo Forgejo existe)**
|
|
||||||
- Type : **Git Repository**
|
|
||||||
- URL : `https://forgejo.barodine.net/barodine/agenthub.git` (si configuré)
|
|
||||||
- Branch : `main`
|
|
||||||
- Path to compose : `compose.coolify.yml`
|
|
||||||
|
|
||||||
**Option B : Via upload local (RECOMMANDÉ - plus rapide)**
|
|
||||||
1. Cliquer sur **Upload** ou **Local Folder**
|
|
||||||
2. Upload le tarball : `/tmp/agenthub-coolify.tar.gz`
|
|
||||||
3. Path to compose : `compose.coolify.yml`
|
|
||||||
|
|
||||||
### Étape 5 : Configurer les variables d'environnement
|
|
||||||
|
|
||||||
Dans l'onglet **Environment Variables**, ajouter :
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Copier depuis .env.coolify.secrets
|
ssh alexandre@192.168.9.23
|
||||||
POSTGRES_PASSWORD=<voir fichier .env.coolify.secrets>
|
|
||||||
JWT_SECRET=<voir fichier .env.coolify.secrets>
|
|
||||||
|
|
||||||
# Variables fixes
|
|
||||||
POSTGRES_USER=agenthub
|
|
||||||
POSTGRES_DB=agenthub
|
|
||||||
ALLOWED_ORIGINS=https://agenthub.barodine.net
|
|
||||||
NODE_ENV=production
|
|
||||||
LOG_LEVEL=info
|
|
||||||
```
|
|
||||||
|
|
||||||
**Fichier secrets :** `agenthub/.env.coolify.secrets` (chmod 600)
|
|
||||||
|
|
||||||
### Étape 6 : Configurer le domaine
|
|
||||||
|
|
||||||
1. Onglet **Domains**
|
|
||||||
2. Ajouter domaine : `agenthub.barodine.net`
|
|
||||||
3. ✅ Activer **HTTPS** (Let's Encrypt)
|
|
||||||
4. ✅ Activer **WebSocket Support**
|
|
||||||
|
|
||||||
### Étape 7 : Déployer
|
|
||||||
|
|
||||||
1. Cliquer sur **Deploy**
|
|
||||||
2. Suivre les logs en temps réel
|
|
||||||
3. Attendre que le build se termine (~3-5 min)
|
|
||||||
|
|
||||||
### Étape 8 : Vérification (PRIORITÉ CEO)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Healthcheck HTTP
|
|
||||||
curl https://agenthub.barodine.net/healthz
|
|
||||||
```
|
|
||||||
|
|
||||||
**Réponse attendue :**
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"status": "ok",
|
|
||||||
"uptime": 123.456
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Si **200 OK** → ✅ **Déploiement réussi !**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Étapes post-déploiement
|
|
||||||
|
|
||||||
### 1. Migrations de base de données
|
|
||||||
|
|
||||||
Via Terminal Coolify (UI) :
|
|
||||||
1. Services → `app` → Terminal
|
|
||||||
2. Exécuter :
|
|
||||||
```bash
|
|
||||||
npm run migrate
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. Vérification complète
|
|
||||||
|
|
||||||
Suivre le guide : `docs/POST-DEPLOY-VERIFICATION.md`
|
|
||||||
|
|
||||||
Phases critiques :
|
|
||||||
- ✅ Healthcheck HTTP
|
|
||||||
- ✅ TLS certificate
|
|
||||||
- ✅ Postgres connecté
|
|
||||||
- ✅ Redis connecté
|
|
||||||
- ✅ WebSocket fonctionnel
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Alternative : Déploiement via SSH direct (si accès serveur)
|
|
||||||
|
|
||||||
Si vous avez accès SSH au serveur Coolify (`192.168.9.25`) :
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 1. Copier le code sur le serveur
|
|
||||||
scp /tmp/agenthub-coolify.tar.gz user@192.168.9.25:/tmp/
|
|
||||||
|
|
||||||
# 2. SSH au serveur
|
|
||||||
ssh user@192.168.9.25
|
|
||||||
|
|
||||||
# 3. Extraire et déployer
|
|
||||||
mkdir -p /opt/agenthub
|
|
||||||
cd /opt/agenthub
|
cd /opt/agenthub
|
||||||
tar xzf /tmp/agenthub-coolify.tar.gz --strip-components=1
|
git pull origin master
|
||||||
|
sudo docker compose -f compose.lan-direct.yml build --no-cache app
|
||||||
# 4. Configurer les variables d'environnement
|
sudo docker compose -f compose.lan-direct.yml up -d
|
||||||
cat > .env <<EOF
|
|
||||||
POSTGRES_PASSWORD=<from .env.coolify.secrets>
|
|
||||||
JWT_SECRET=<from .env.coolify.secrets>
|
|
||||||
POSTGRES_USER=agenthub
|
|
||||||
POSTGRES_DB=agenthub
|
|
||||||
ALLOWED_ORIGINS=https://agenthub.barodine.net
|
|
||||||
NODE_ENV=production
|
|
||||||
LOG_LEVEL=info
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# 5. Déployer
|
|
||||||
docker compose -f agenthub/compose.coolify.yml up -d --build
|
|
||||||
|
|
||||||
# 6. Vérifier
|
|
||||||
curl http://localhost:3000/healthz
|
curl http://localhost:3000/healthz
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
### Option B: Copier les fichiers modifiés
|
||||||
|
|
||||||
## Informations du déploiement
|
```bash
|
||||||
|
# Sur votre machine
|
||||||
|
cd /home/alexandre/.paperclip/instances/default/workspaces/.../agenthub
|
||||||
|
scp src/socket/index.ts alexandre@192.168.9.23:/opt/agenthub/src/socket/
|
||||||
|
scp test/socket.test.ts alexandre@192.168.9.23:/opt/agenthub/test/
|
||||||
|
scp test/j5-messaging-validation.js alexandre@192.168.9.23:/opt/agenthub/test/
|
||||||
|
|
||||||
**Projet Coolify :**
|
# Sur le serveur
|
||||||
- ID: 5
|
ssh alexandre@192.168.9.23
|
||||||
- UUID: `x9fenmiro11hv1uqij88z88a`
|
cd /opt/agenthub
|
||||||
- Nom: Barodine IA
|
sudo docker compose -f compose.lan-direct.yml build --no-cache app
|
||||||
|
sudo docker compose -f compose.lan-direct.yml up -d
|
||||||
|
```
|
||||||
|
|
||||||
**Environnement :**
|
## Validation
|
||||||
- Nom: production
|
|
||||||
- UUID: `ck47341a8lzae6x3mz8rd2cm`
|
|
||||||
|
|
||||||
**Secrets générés :**
|
```bash
|
||||||
- Fichier: `.env.coolify.secrets` (chmod 600)
|
cd /opt/agenthub
|
||||||
- Ne PAS committer ce fichier
|
node test/j5-messaging-validation.js 192.168.9.23:3000
|
||||||
- Sauvegarder dans un gestionnaire de secrets si nécessaire
|
```
|
||||||
|
|
||||||
**Code source :**
|
Attendu: ✅ All J5 tests passed!
|
||||||
- Tarball: `/tmp/agenthub-coolify.tar.gz` (250 KB)
|
|
||||||
- Contient: Dockerfile, compose.coolify.yml, src/, scripts/, docs/
|
|
||||||
|
|
||||||
---
|
## Fichiers modifiés
|
||||||
|
|
||||||
## Priorité CEO
|
- `src/socket/index.ts` — Handlers room:list + message:history
|
||||||
|
- `test/socket.test.ts` — Tests unitaires
|
||||||
|
- `test/j5-messaging-validation.js` — Script validation E2E
|
||||||
|
|
||||||
**Objectif immédiat :** Healthcheck fonctionnel sur `https://agenthub.barodine.net/healthz`
|
## Commits
|
||||||
|
|
||||||
Dès que le healthcheck répond `200 OK`, le reste peut suivre progressivement :
|
```
|
||||||
- Auth agents
|
ff408af docs: J5 implementation completion summary
|
||||||
- Rooms
|
c082ea9 docs: J5 deployment update guide
|
||||||
- Messaging
|
a79df89 feat: Add room:list and message:history handlers
|
||||||
|
```
|
||||||
---
|
|
||||||
|
|
||||||
## Support
|
|
||||||
|
|
||||||
- Guide complet: `docs/DEPLOY-COOLIFY-QUICKSTART.md`
|
|
||||||
- Vérification: `docs/POST-DEPLOY-VERIFICATION.md`
|
|
||||||
- Script API: `scripts/deploy-coolify-api.sh` (si API Coolify fonctionne)
|
|
||||||
|
|
||||||
**Token API Coolify fourni :** ✅
|
|
||||||
**Tout est prêt pour le déploiement !**
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue