Merged
Conversation
存储层重构: - 新增 StorageService 抽象基类,支持 LocalStorage(本地,开发默认) 和 S3Storage(MinIO / AWS S3 / 华为 OBS 等,生产推荐)双后端 - upload.py 改用 StorageService,移除直接文件写入;markdown 内存解码, docx 使用 tempfile 临时解析后存入 StorageService - main.py 改为条件挂载 StaticFiles(仅本地模式下生效) 基础设施: - docker-compose.yml 新增 minio 服务(minio_data volume 持久化, 9001 端口为控制台,backend 依赖 MinIO 健康检查) - nginx.conf 将 /uploads/ 代理改为直连 minio:9000/opengecko/ (开发时由 FastAPI StaticFiles 接管,无需 nginx) 配置管理: - config.py 所有字段加 Field(description=...),配置说明写入代码本身 - 新增 GET /api/admin/config-schema 端点(仅 superuser 可访问), 返回 Pydantic 自动生成的 JSON Schema 及当前生效值(密钥脱敏) - 补充 .env.example 和 .env.prod.example 的 S3/MinIO 配置块 迁移工具: - 新增 backend/scripts/migrate_to_minio.py,一键将本地 uploads/ 目录 文件批量迁移至 MinIO,支持环境变量覆盖参数
Contributor
CLA Signature PassZhengZhenyu, thanks for your pull request. All authors of the commits have signed the CLA. 👍 |
Contributor
Linking Issue Notice@ZhengZhenyu , the pull request must be linked to at least one issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
关联 Issue:#
Checklist