Initial commit: secondary school grade archive system.

Add FastAPI/React app with Docker deployment, Ubuntu one-click install, and docs for junior/senior high score tracking and mistake bank.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-28 11:18:58 +08:00
commit e329d3398a
76 changed files with 8506 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
$ErrorActionPreference = "Stop"
$BackupDir = if ($args[0]) { $args[0] } else { ".\backups" }
$Timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
New-Item -ItemType Directory -Force -Path $BackupDir | Out-Null
Write-Host "Backing up database..."
docker compose exec -T db pg_dump -U postgres student_archive | Out-File -Encoding utf8 "$BackupDir\db_$Timestamp.sql"
Write-Host "Backing up uploads..."
Compress-Archive -Path "uploads\*" -DestinationPath "$BackupDir\uploads_$Timestamp.zip" -Force
Write-Host "Backup complete:"
Write-Host " $BackupDir\db_$Timestamp.sql"
Write-Host " $BackupDir\uploads_$Timestamp.zip"
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
# 兼容入口,请优先使用 deploy/backup.sh
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
exec bash "${SCRIPT_DIR}/../deploy/backup.sh" "$@"