feat(storage): support cloud storage

This commit is contained in:
MingxuanGame
2025-08-12 03:58:06 +00:00
parent 79b41010d5
commit cf3a6bbd21
11 changed files with 1075 additions and 1 deletions

View File

@@ -49,3 +49,29 @@ ENABLE_ALL_MODS_PP=false # 启用所有 Mod 的 PP 计算
ENABLE_SUPPORTER_FOR_ALL_USERS=false # 启用所有新注册用户的支持者状态
ENABLE_ALL_BEATMAP_LEADERBOARD=false # 启用所有谱面的排行榜(没有排行榜的谱面会以 APPROVED 状态返回)
SEASONAL_BACKGROUNDS='[]' # 季节背景图 URL 列表
# 存储服务设置
# 支持的存储类型local本地存储、r2Cloudflare R2、s3AWS S3
STORAGE_SERVICE="local"
# 存储服务配置 (JSON 格式)
# 本地存储配置(当 STORAGE_SERVICE=local 时)
STORAGE_SETTINGS='{"local_storage_path": "./storage"}'
# Cloudflare R2 存储配置(当 STORAGE_SERVICE=r2 时)
# STORAGE_SETTINGS='{
# "r2_account_id": "your_cloudflare_r2_account_id",
# "r2_access_key_id": "your_r2_access_key_id",
# "r2_secret_access_key": "your_r2_secret_access_key",
# "r2_bucket_name": "your_r2_bucket_name",
# "r2_public_url_base": "https://your-custom-domain.com"
# }'
# AWS S3 存储配置(当 STORAGE_SERVICE=s3 时)
# STORAGE_SETTINGS='{
# "s3_access_key_id": "your_aws_access_key_id",
# "s3_secret_access_key": "your_aws_secret_access_key",
# "s3_bucket_name": "your_s3_bucket_name",
# "s3_region_name": "us-east-1",
# "s3_public_url_base": "https://your-custom-domain.com"
# }'