feat: 添加 GitHub 存储支持,更新相关文档和配置

This commit is contained in:
2025-11-08 20:54:55 +08:00
parent bafcb9d9df
commit e71734e2d6
10 changed files with 798 additions and 57 deletions

View File

@@ -1,10 +1,10 @@
# 存储类型选择
## Done
# r2 | Cloudflare R2
# github | GitHub Repository
## TODO LIST:
# cnbcool | Tencent cnb.cool
# s3 | Amazon S3
# github-repo | GitHub Repo
STORAGE_TYPE=r2
# ==================== Cloudflare R2 配置 ====================
@@ -27,6 +27,24 @@ R2_PUBLIC_URL=https://pub-<bucket-name>.r2.dev
# R2 预签名 URL 过期时间(秒,默认: 3600
R2_PRESIGN_EXPIRES=3600
# ==================== GitHub 存储配置 ====================
# GitHub 仓库所有者
GITHUB_REPO_OWNER=your-username
# GitHub 仓库名称
GITHUB_REPO_NAME=your-repo
# GitHub 访问令牌 (需要 repo 权限)
GITHUB_ACCESS_TOKEN=your-access-token
# GitHub 分支名称 (默认: main)
GITHUB_BRANCH=main
# GitHub Raw 文件反向代理 URL (可选,用于加速访问)
# 例如: https://raw.fastgit.org 或 https://ghproxy.com/https://raw.githubusercontent.com
# 留空则使用官方 raw.githubusercontent.com
GITHUB_RAW_PROXY_URL=
# ==================== 应用配置 ====================
# 缩略图缓存时间(秒,默认: 3600
THUMB_TTL_SECONDS=3600