**Motivations:** - Export Signet and mining wallet backups to git with only 2 versions kept - Document and add backup/restore scripts for signet and mining wallet **Correctifs:** - Backup-to-git uses SSH URL for passwordless cron; copy timestamped files only; prune to 2 versions; remove *-latest from backup repo **Evolutions:** - data/backup-to-git-cron.sh: daily export to git.4nkweb.com/4nk/backup - save-signet-datadir-backup.sh, restore-signet-from-backup.sh, export-mining-wallet.sh, import-mining-wallet.sh - features/backup-to-git-daily-cron.md, docs/MAINTENANCE.md backup section - .gitignore: data/backup-to-git.log **Pages affectées:** - .gitignore, data/backup-to-git-cron.sh, docs/MAINTENANCE.md, features/backup-to-git-daily-cron.md - save-signet-datadir-backup.sh, restore-signet-from-backup.sh, export-mining-wallet.sh, import-mining-wallet.sh - Plus autres fichiers modifiés ou non suivis déjà présents dans le working tree
67 lines
1.3 KiB
Markdown
67 lines
1.3 KiB
Markdown
# Configuration des ports - UserWallet
|
|
|
|
**Author:** Équipe 4NK
|
|
**Date:** 2026-01-26
|
|
|
|
## Ports utilisés
|
|
|
|
### Frontend (userwallet)
|
|
|
|
- **Port 3018** : Serveur de développement Vite
|
|
- Configuré dans `vite.config.ts`
|
|
- `strictPort: false` pour éviter les conflits
|
|
- Accessible sur `http://localhost:3018`
|
|
|
|
### API Relay (api-relay)
|
|
|
|
- **Port 3019** : Serveur Express.js du relais
|
|
- Configuré dans `api-relay/src/index.ts`
|
|
- Variable d'environnement `PORT` (défaut: 3019)
|
|
- Accessible sur `http://localhost:3019`
|
|
|
|
## Vérification des ports
|
|
|
|
Pour vérifier si un port est disponible :
|
|
|
|
```bash
|
|
# Linux
|
|
lsof -i :3018
|
|
lsof -i :3019
|
|
|
|
# Ou avec ss
|
|
ss -tuln | grep -E ":(3018|3019)"
|
|
```
|
|
|
|
## Changement de ports
|
|
|
|
### Frontend
|
|
|
|
Modifier `vite.config.ts` :
|
|
```typescript
|
|
server: {
|
|
port: <nouveau_port>,
|
|
strictPort: false,
|
|
}
|
|
```
|
|
|
|
### API Relay
|
|
|
|
Modifier via variable d'environnement :
|
|
```bash
|
|
PORT=3020 npm start
|
|
```
|
|
|
|
Ou modifier `api-relay/src/index.ts` :
|
|
```typescript
|
|
const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : <nouveau_port>;
|
|
```
|
|
|
|
## Ports évités
|
|
|
|
Les ports suivants sont évités car potentiellement occupés :
|
|
- **3007** : Utilisé par d'autres services
|
|
- **8080** : Port commun, souvent occupé
|
|
- **3015** : Occupé (mempool.4nkweb.com, machine bitcoin)
|
|
- **3016** : Réservé (git1.4nkweb.com)
|
|
- **3017** : Réservé (rocket1.4nkweb.com)
|