← Retour
🖥️ Audit Serveur Note de Frais
Date : Janvier 2026 | Serveur : srv1194599.hstgr.cloud | IP : 72.62.25.71
🌐 Services Actifs
| Service | Port | Description |
| nginx | 80, 443, 8080-8082 | Reverse proxy / serveur web |
| n8n | 5678 (Docker) | Automatisation workflows |
| PostgreSQL | 5432 | Base de données |
| ClicPratic API | 3001 | API backend |
| SMS API | 3000 | Service SMS |
| Doctolib Webhook | 5000 | Intégration Doctolib |
🔗 URLs Principales
🗄️ Base de Données PostgreSQL
Connexion notes_frais_db
| Paramètre | Valeur |
| Host | localhost (ou host.docker.internal depuis Docker) |
| Database | notes_frais_db |
| User | notes_frais_user |
| Password | NotesF2026Secure |
| Port | 5432 |
Tables
| Table | Description |
| scan_factures_cache | Cache des scans de factures IA |
| factures_ia | Factures Anthropic |
| factures_mailmeteor | Factures Mailmeteor |
| factures_twilio | Factures Twilio |
| factures_google_workspace | Factures Google |
| factures_lovable | Factures Lovable |
🐳 Docker
| Conteneur | Image | IP |
| n8n-n8n-1 | n8n:2.2.4 | 172.18.0.2 |
| n8n-traefik-1 | traefik | 172.18.0.4 |
| n8n-note-frais | php:8.2-cli-alpine | 172.18.0.3 |
Config : /docker/n8n/docker-compose.yml
Extra hosts : host.docker.internal → host-gateway
📁 Structure Fichiers
/var/www/note-frais/
├── index.html # Interface principale
├── aide.html # Page d'aide
├── favicon.ico
├── api/
│ └── get-cache.php # API lecture PostgreSQL
├── configuration/
│ ├── index.html # Cette page
│ └── audit-serveur.md
└── credentials/
/docker/n8n/
├── docker-compose.yml
└── docker-compose.yml.backup
🔄 Workflows n8n
| Workflow | Webhook | Description |
| Scan Factures IA v2 | /webhook/scan-factures-ia | Scan PDFs → PostgreSQL |
| Note de Frais COMPLET | /webhook/note-frais | Génère PDF + justificatifs |
🛠️ Commandes Utiles
Redémarrer les services
# PostgreSQL
sudo systemctl restart postgresql
# nginx
sudo systemctl reload nginx
# n8n (Docker)
cd /docker/n8n && docker compose restart
# PHP-FPM
sudo systemctl restart php8.3-fpm
Logs
# nginx
tail -f /var/log/nginx/error.log
# n8n
docker logs -f n8n-n8n-1
Tester les connexions
# PostgreSQL
PGPASSWORD=NotesF2026Secure psql -h localhost -U notes_frais_user -d notes_frais_db -c "SELECT 1;"
# API cache
curl "https://note-frais.srv1194599.hstgr.cloud/api/get-cache.php?scan_key=2026-01"
# Webhook scan
curl "https://n8n.srv1194599.hstgr.cloud/webhook/scan-factures-ia?annee=2026&mois=01"
✅ Modifications Janvier 2026
- Créé base PostgreSQL locale (
notes_frais_db) - remplace Supabase
- Modifié workflow n8n pour PostgreSQL
- Créé API PHP (
/api/get-cache.php)
- Configuré PostgreSQL pour Docker
- Ajouté upload justificatifs dans workflow
- Créé page d'aide avec bouton "?"
Dernière mise à jour : 25 janvier 2026