prod setup
This commit is contained in:
26
README.md
26
README.md
@@ -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.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user