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
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
#
# 停止并移除容器(默认保留数据卷与 uploads)
# 版权所有 (c) 马建军
#
set -euo pipefail
INSTALL_DIR="${INSTALL_DIR:-/opt/secondary-school-grade-archive}"
REMOVE_VOLUMES="${REMOVE_VOLUMES:-0}"
cd "${INSTALL_DIR}" || exit 1
echo "将停止 Docker 服务…"
if [[ "${REMOVE_VOLUMES}" == "1" ]]; then
echo "警告: 将删除数据库卷(所有成绩数据会丢失)"
read -r -p "确认删除数据卷? 输入 yes: " ans
if [[ "${ans}" == "yes" ]]; then
docker compose --env-file .env down -v
else
echo "已取消"
exit 1
fi
else
docker compose --env-file .env down
echo "数据卷与 ${INSTALL_DIR}/uploads 已保留"
fi
echo "卸载完成。源码目录 ${INSTALL_DIR} 未自动删除,如需删除请手动 rm -rf"