prod setup

This commit is contained in:
Johan LEROY
2026-05-04 12:05:08 +02:00
parent d30e8e9376
commit 9b7bc5334e
2 changed files with 14 additions and 66 deletions

View File

@@ -81,22 +81,24 @@ Login via mot de passe, cookie httpOnly 7 jours.
### Paramètres Plesk Node.js
- **Node.js version** : 22
- **Application root** : racine du repo
- **Node.js version** : 22+ (24.x OK)
- **Application root** : `/httpdocs/johanleroy`
- **Document root Apache** : `/httpdocs/johanleroy/dist/client` (Apache sert les statiques buildés, le reste passe en proxy vers Node)
- **Application startup file** : `dist/server/entry.mjs`
- **Application URL** : https://johanleroy.fr
- **Application URL** : https://johanleroy.fr (SSL Let's Encrypt obligatoire pour les cookies admin)
### CI/CD Gitea (branch `main`)
### Déploiement manuel
Le workflow `.gitea/workflows/deploy.yml` déclenche un build + upload FTP sur chaque push `main`.
1. **Build local** : `npm run build` (vérifier que `dist/server/entry.mjs` est généré)
2. **Upload FTP/SFTP** vers le répertoire de l'application Plesk (ex : `/httpdocs/johanleroy/`) :
- `dist/` (écrase l'existant)
- `public/` (écrase l'existant)
- `package.json`
- `package-lock.json`
3. **Plesk → Node.js → NPM install** (à faire si `package.json` a changé)
4. **Plesk → Node.js → Restart App** pour recharger le nouveau bundle
**Secrets Gitea à configurer :**
- `FTP_HOST`
- `FTP_USER`
- `FTP_PASSWORD`
- `FTP_TARGET_DIR` (ex : `/httpdocs/johanleroy`)
Après chaque déploiement : redémarrer l'application Node.js depuis Plesk pour prendre en compte les nouveaux fichiers.
**Ne JAMAIS écraser** : `data/`, `.env`, `node_modules/` côté serveur.
---