diff --git a/.dockerignore b/.dockerignore index c7575d2..b3ab82c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -22,7 +22,6 @@ tests # Docker selbst docker-compose*.yml Dockerfile -docker/ # IDE .idea diff --git a/Dockerfile b/Dockerfile index 9342420..853d4c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.5-fpm-bullseye +FROM php:8.4-fpm-bullseye # System-Abhängigkeiten RUN apt-get update && apt-get install -y \ diff --git a/app/Http/Controllers/BackupController.php b/app/Http/Controllers/BackupController.php new file mode 100644 index 0000000..efc9d01 --- /dev/null +++ b/app/Http/Controllers/BackupController.php @@ -0,0 +1,28 @@ + 'Datenbank', + // 'description' => 'MariaDB Vollbackup', + // 'icon' => '🗄️', + // 'last_run' => null, + // 'status' => null, + // ], + ]; + + // Backup-Logs — später aus DB oder Log-Dateien befüllen + $logs = collect(); + + return view('backup.index', compact('backupTypes', 'logs')); + } +} diff --git a/deploy.sh b/deploy.sh index c5372a7..5855892 100644 --- a/deploy.sh +++ b/deploy.sh @@ -75,11 +75,10 @@ CLONE_URL=$(echo "$GITEA_URL" | sed "s|https://|https://${GITEA_USER}:${GITEA_PA CLONE_URL="${CLONE_URL}/${GITEA_USER}/Network-MGMT.git" echo "" -echo -e "${Y}[1/4] Docker prüfen / installieren ...${NC}" -if ! command -v docker &>/dev/null; then - curl -fsSL https://get.docker.com | sh - systemctl enable --now docker -fi +echo -e "${Y}[1/4] Docker installieren / aktualisieren ...${NC}" +curl -fsSL https://get.docker.com | sh +systemctl enable --now docker +systemctl restart docker echo -e "${G} ✓ Docker: $(docker --version | awk '{print $3}' | tr -d ',')${NC}" if ! docker compose version &>/dev/null 2>&1; then diff --git a/docker/nginx.conf b/docker/nginx.conf index 47b8f5c..dad7bfd 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -3,6 +3,12 @@ events { } http { + # Extrahiert den Port aus dem Host-Header (z.B. 192.168.86.229:8080 → 8080) + map $http_host $real_port { + default 80; + "~:(?
\d+)$" $p; + } + include /etc/nginx/mime.types; default_type application/octet-stream; sendfile on; @@ -28,6 +34,7 @@ http { fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; + fastcgi_param SERVER_PORT $real_port; fastcgi_read_timeout 120; } diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 78b684f..0e22a61 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -34,14 +34,23 @@
Noch keine Backup-Typen konfiguriert.
+Hier werden später die verfügbaren Backup-Typen angezeigt.
+{{ $type['name'] }}
+{{ $type['description'] }}
+ @if($type['last_run']) ++ Zuletzt: {{ \Carbon\Carbon::parse($type['last_run'])->format('d.m.Y H:i') }} +
+ @endif + @if($type['status']) + + {{ $type['status'] === 'ok' ? '✓ Erfolgreich' : '✗ Fehler' }} + + @endif +| Zeitpunkt | +Typ | +Status | +Größe | +Meldung | +
|---|---|---|---|---|
| + {{ \Carbon\Carbon::parse($log->created_at)->format('d.m.Y H:i') }} + | +{{ $log->type }} | ++ + {{ $log->status === 'success' ? '✓ OK' : '✗ Fehler' }} + + | +{{ $log->size ?? '—' }} | +{{ $log->message ?? '—' }} | +