Docker Compose stack (n8n, PostgreSQL 16, Redis 7, 1 worker) with: - nginx local proxy on port 8088, YunoHost TLS termination config - helper scripts: backup/restore/import/export/update - .env.example, README with architecture, ops commands, to-do list Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
819 B
Bash
Executable file
24 lines
819 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
ROOT="$(dirname "$SCRIPT_DIR")"
|
|
COMPOSE="$ROOT/compose/docker-compose.yml"
|
|
|
|
if [ -z "${1:-}" ]; then
|
|
echo "Verwendung: $0 <credentials.json>"
|
|
echo "WARNUNG: Credentials-Exporte sind unverschlüsselt. Datei nach Import löschen!"
|
|
exit 1
|
|
fi
|
|
|
|
SOURCE="$1"
|
|
DEST="$ROOT/imports/credentials/$(basename "$SOURCE")"
|
|
cp "$SOURCE" "$DEST"
|
|
|
|
echo "[import-credentials] Importiere: $(basename "$SOURCE")"
|
|
echo "[import-credentials] WARNUNG: Diese Datei enthält unverschlüsselte Credentials!"
|
|
docker compose -f "$COMPOSE" exec n8n \
|
|
n8n import:credentials --input="/imports/credentials/$(basename "$SOURCE")"
|
|
|
|
echo "[import-credentials] Fertig."
|
|
echo "[import-credentials] Empfehlung: Quelldatei jetzt löschen: rm '$SOURCE'"
|