Files
portal/deploy/deploy.sh
T
kerimatilganandClaude Opus 5.5 6606420b4a Handy-Insel Portal: Startseite, Kopfleiste und Authentik-Anbindung
- Portal mit Kacheln aus Authentik (pro Benutzer gefiltert) und "Aktuelles"
- Web-Component <hi-topbar> als zentraler App-Umschalter für alle Tools
- OIDC-Login über Authentik, zentrales Abmelden
- Setup-Skript für Authentik (Gruppen-Bindungen, Portal-App, Service-Account)
- Deployment auf den Portal-CT per systemd

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 12:18:32 +02:00

32 lines
981 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# Baut das Portal lokal und spielt es auf den Portal-CT aus.
# ./deploy/deploy.sh [root@192.168.1.28]
set -euo pipefail
TARGET="${1:-root@192.168.1.28}"
cd "$(dirname "$0")/.."
npm ci
npm run build
rsync -az --delete \
--include='/dist/***' --include='/scripts/***' --include='/deploy/***' \
--include='/package.json' --include='/package-lock.json' --exclude='*' \
./ "$TARGET:/opt/hi-portal/"
ssh "$TARGET" bash -s <<'REMOTE'
set -euo pipefail
cd /opt/hi-portal
npm ci --omit=dev --no-audit --no-fund
chown -R root:root /opt/hi-portal
install -m 644 deploy/hi-portal.service /etc/systemd/system/hi-portal.service
systemctl daemon-reload
systemctl enable hi-portal >/dev/null
if grep -q '^OIDC_CLIENT_SECRET=.\+' /etc/hi-portal/portal.env; then
systemctl restart hi-portal
sleep 2
systemctl --no-pager --lines=5 status hi-portal
else
echo "Hinweis: /etc/hi-portal/portal.env ist noch nicht vollständig – Dienst nicht gestartet."
fi
REMOTE