- Remplacer PDFMonkey par Gotenberg (auto-hébergé sur VPS) - Créer template Handlebars pour contrats (lib/templates/contract.hbs) - Créer formateur de données (lib/contract-data-formatter.ts) - Ajouter helpers Handlebars pour conditions et transformations - Mettre à jour API route generate-pdf pour utiliser Gotenberg - Ajouter GOTENBERG_URL dans .env.local (http://localhost:3001 pour dev) - Créer script tunnel-gotenberg.sh pour dev local - Ajouter documentation MIGRATION_GOTENBERG.md Avantages: - Souveraineté des données (pas d'API externe) - Performance (génération locale) - Coût (0€ vs abonnement PDFMonkey) - Sécurité (Gotenberg non exposé publiquement)
14 lines
526 B
Bash
Executable file
14 lines
526 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Script pour créer un tunnel SSH vers Gotenberg sur le VPS
|
|
# Usage: ./tunnel-gotenberg.sh
|
|
|
|
echo "🚇 Création du tunnel SSH vers Gotenberg..."
|
|
echo "📍 Gotenberg sera accessible sur: http://localhost:3001"
|
|
echo "⚠️ Assurez-vous que GOTENBERG_URL=http://localhost:3001 est dans .env.local"
|
|
echo ""
|
|
|
|
# Créer le tunnel SSH
|
|
# -L 3001:gotenberg:3000 : Forward le port local 3001 vers gotenberg:3000 sur le VPS
|
|
# -N : Ne pas exécuter de commande distante
|
|
ssh -L 3001:gotenberg:3000 renaud@144.91.113.70 -N
|