Files
customer-installer/WORKFLOW_RELOAD_TODO.md
Wolfgang aa00fb9d29 feat: Add credentials management system and comprehensive testing
- Add credentials management system with automatic saving and updates
- Add upload form URL to JSON output
- Add Ollama model information to JSON output
- Implement credential update system (update_credentials.sh)
- Implement credential save system (save_credentials.sh)
- Add comprehensive test suites (infrastructure, n8n, PostgREST, complete system)
- Add workflow auto-reload system with systemd service
- Add detailed documentation (CREDENTIALS_MANAGEMENT.md, TEST_REPORT.md, VERIFICATION_SUMMARY.md)
- Improve n8n setup with robust API-based workflow import
- Add .gitignore for credentials directory
- All tests passing (40+ test cases)

Key Features:
- Credentials automatically saved to credentials/<hostname>.json
- Update Ollama URL from IP to hostname without container restart
- Comprehensive testing with 4 test suites
- Full documentation and examples
- Production-ready system
2026-01-24 22:31:26 +01:00

2.2 KiB

Workflow Auto-Reload bei LXC-Neustart - Implementierungsplan

Status: Implementierung abgeschlossen - Bereit für Tests


Aufgaben

Phase 1: Systemd-Service erstellen

  • Systemd-Unit-Datei Template erstellen (n8n-workflow-reload.service)
  • Service wartet auf Docker und n8n-Container
  • Service ruft Reload-Script auf

Phase 2: Reload-Script erstellen

  • Bash-Script Template erstellen (reload-workflow.sh)
  • Konfiguration aus .env lesen
  • Warten bis n8n API bereit ist
  • Workflow-Status prüfen (existiert bereits?)
  • Alten Workflow löschen (sauberer Import)
  • Neuen Workflow importieren
  • Workflow aktivieren
  • Logging implementieren

Phase 3: Integration in install.sh

  • Workflow-Template persistent speichern
  • Systemd-Service-Datei in LXC kopieren
  • Reload-Script in LXC kopieren
  • Script ausführbar machen
  • Systemd-Service aktivieren
  • Service beim ersten Boot starten

Phase 4: Hilfsfunktionen in libsupabase.sh

  • n8n_api_list_workflows() - Workflows auflisten
  • n8n_api_delete_workflow() - Workflow löschen
  • n8n_api_get_workflow_by_name() - Workflow nach Name suchen
  • n8n_api_get_credential_by_name() - Credential nach Name suchen

Phase 5: Tests

  • Test: Initiale Installation
  • Test: LXC-Neustart
  • Test: Workflow wird neu geladen
  • Test: Credentials bleiben erhalten
  • Test: Logging funktioniert

Technische Details

Systemd-Service

  • Name: n8n-workflow-reload.service
  • Type: oneshot
  • After: docker.service
  • Wants: docker.service

Reload-Script

  • Pfad: /opt/customer-stack/reload-workflow.sh
  • Log: /opt/customer-stack/logs/workflow-reload.log
  • Workflow-Template: /opt/customer-stack/workflow-template.json

Workflow-Reload-Strategie

  1. Alte Workflows mit gleichem Namen löschen
  2. Neuen Workflow aus Template importieren
  3. Credentials automatisch zuordnen (aus bestehenden Credentials)
  4. Workflow aktivieren

Nächste Schritte

  1. Systemd-Service-Template erstellen
  2. Reload-Script-Template erstellen
  3. Hilfsfunktionen in libsupabase.sh hinzufügen
  4. Integration in install.sh
  5. Testen