(feature) Add full native installer and self-check page
Expand the systemd installer so it can perform a complete native installation with sensible defaults: copy the checkout into the target app directory, create runtime directories, write the environment file, install dependencies, configure systemd units, and optionally configure nginx. Add a staff-only Django self-check page that verifies runtime settings, required binaries, writable paths, database connectivity, global config state, and systemd service status when available. Document installer overrides and expose the self-check from the main navigation.
This commit is contained in:
@@ -24,6 +24,7 @@ from .forms import (
|
||||
)
|
||||
from .models import BackupRun, GlobalConfig, HostConfig, ScheduleConfig, SnapshotRecord, SshCredential
|
||||
from .retention import run_sql_retention_apply, run_sql_retention_plan
|
||||
from .self_check import collect_self_checks, summarize_self_checks
|
||||
from .snapshot_discovery import discover_snapshots, inspect_snapshot_discovery
|
||||
|
||||
|
||||
@@ -58,6 +59,19 @@ def dashboard(request):
|
||||
return render(request, "pobsync_backend/dashboard.html", context)
|
||||
|
||||
|
||||
@staff_member_required
|
||||
def self_check(request):
|
||||
checks = collect_self_checks()
|
||||
return render(
|
||||
request,
|
||||
"pobsync_backend/self_check.html",
|
||||
{
|
||||
"checks": checks,
|
||||
"summary": summarize_self_checks(checks),
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@staff_member_required
|
||||
def ssh_credentials(request):
|
||||
context = {
|
||||
|
||||
Reference in New Issue
Block a user