From 87560a403029f320bd7ccfc3fdf0b8a5f2746840 Mon Sep 17 00:00:00 2001 From: zhang1106 <849185023@qq.com> Date: Sat, 9 May 2026 13:36:46 +0800 Subject: [PATCH] =?UTF-8?q?docs(config):=20=E6=9B=B4=E6=96=B0.gitignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 108 +++++++++++++----- backend/backgroundSettings.json.example | 6 + .../config/auto-backup-settings.json.example | 10 ++ .../config/remote-backup-configs.json.example | 11 ++ 4 files changed, 109 insertions(+), 26 deletions(-) create mode 100644 backend/backgroundSettings.json.example create mode 100644 backend/config/auto-backup-settings.json.example create mode 100644 backend/config/remote-backup-configs.json.example diff --git a/.gitignore b/.gitignore index be37d58..2fb8da7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,44 @@ -# Dependencies +# ============================================== +# Dependencies (依赖目录) +# ============================================== node_modules/ -/backed/temp +**/node_modules/ -# Build outputs +# ============================================== +# Build outputs (构建输出) +# ============================================== dist/ build/ +.vite/ +.next/ +.nuxt/ -# Environment files +# ============================================== +# Environment files (环境配置文件) +# ============================================== .env .env.local -.env.development.local -.env.test.local -.env.production.local -.gitignore -.vercelignore +.env.*.local +!.env.example -# Logs -logs +# ============================================== +# IDE & Editor (编辑器配置) +# ============================================== +.vscode/ +.idea/ +*.swp +*.swo +*~ +.DS_Store +Thumbs.db +.project +.classpath +.settings/ + +# ============================================== +# Logs (日志文件) +# ============================================== +logs/ *.log npm-debug.log* yarn-debug.log* @@ -24,34 +46,68 @@ yarn-error.log* pnpm-debug.log* lerna-debug.log* -# Editor directories and files -.vscode/ -.idea/ -.trae/ -.vercel/ -*.swp -*.swo -*~ -.DS_Store - -# Database files +# ============================================== +# Database files (数据库文件) +# ============================================== *.db *.sqlite +*.sqlite3 -# Backup files (generated by maintenance scripts) +# ============================================== +# Backup files (备份文件) +# ============================================== backend/backups/ *.backup.json +*.bak -# Uploads directory (user-uploaded files) +# ============================================== +# Uploads directory (用户上传文件) +# ============================================== backend/uploads/* !backend/uploads/.gitkeep -# Temporary files +# ============================================== +# Temporary files (临时文件) +# ============================================== backend/temp/* !backend/temp/.gitkeep *.tmp *.temp +*.cache -#数据文件 +# ============================================== +# Data files (数据文件) +# ============================================== *.xlsx +*.xls *.csv + +# ============================================== +# Test coverage (测试覆盖率) +# ============================================== +coverage/ +.nyc_output/ + +# ============================================== +# Process & Runtime (进程和运行时文件) +# ============================================== +.pid +*.pid +frontend/.frontend-pid +frontend/.frontend-port + +# ============================================== +# User config files (用户配置文件) +# ============================================== +backend/backgroundSettings.json +backend/fileIndex.json +backend/config/auto-backup-settings.json +backend/config/remote-backup-configs.json + +# ============================================== +# Misc (其他) +# ============================================== +.trae/ +.vercel/ +.gitignore +.vercelignore diff --git a/backend/backgroundSettings.json.example b/backend/backgroundSettings.json.example new file mode 100644 index 0000000..dc30926 --- /dev/null +++ b/backend/backgroundSettings.json.example @@ -0,0 +1,6 @@ +{ + "opacity": 0.8, + "blur": 5, + "value": "/images/bg.jpg", + "type": "image" +} diff --git a/backend/config/auto-backup-settings.json.example b/backend/config/auto-backup-settings.json.example new file mode 100644 index 0000000..e06b5d9 --- /dev/null +++ b/backend/config/auto-backup-settings.json.example @@ -0,0 +1,10 @@ +{ + "enabled": true, + "cronExpression": "0 19 * * *", + "description": "自动备份", + "backupType": "full", + "includeFiles": true, + "compress": true, + "maxCount": 30, + "maxAgeDays": 90 +} diff --git a/backend/config/remote-backup-configs.json.example b/backend/config/remote-backup-configs.json.example new file mode 100644 index 0000000..f858f3d --- /dev/null +++ b/backend/config/remote-backup-configs.json.example @@ -0,0 +1,11 @@ +{ + "targets": [], + "globalSettings": { + "enabled": false, + "uploadAfterBackup": false, + "deleteLocalAfterUpload": false, + "retryCount": 3, + "retryDelay": 5000, + "timeout": 300000 + } +}