Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ Refactor: start minio more gratefully in setup.sh #5290

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

cy948
Copy link
Contributor

@cy948 cy948 commented Jan 4, 2025

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

  • ♻️ docker-compose/local/.env.*.example: 指定MINIO的用户名为admin
  • 👷 docker-compose/local/docker-compose.yml: 在MINIO启动时创建bucket
  • 👷 docker-compose/local/setup.sh
    • 不再下载含MINIO配置数据的压缩包,同时删去多余的解压代码
    • 若初始密码修改失败,即用户无sed时,显示默认密码
  • 🔧 docker-compose/local/init_data.json: 避免修改密码时将密码明文修改到phone

📝 补充信息 | Additional Information

  • 本PR旨在去除原脚本中对MINIO初始数据的依赖。因为这既不安全,也不方便进行脚本管理。
  • 移除有两个难点:一是如何创建bucket,二是如何设置bucket的权限。
    • 对于难点一,在 docker compose 启动 entriypoint 添加脚本完成。
    • 对于难点二,计划使用文档辅助实现,这意味着使用公网部署的朋友需要进 MINIO 面板进行手动操作。
  • PR 未合并时的测试
bash <(curl -fsSL https://raw.githubusercontent.com/cy948/lobe-chat/refactor/minio-pswd/docker-compose/local/setup.sh) -f -l zh_CN --url https://raw.githubusercontent.com/cy948/lobe-chat/refactor/minio-pswd

Copy link

vercel bot commented Jan 4, 2025

@cy948 is attempting to deploy a commit to the LobeHub Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

gru-agent bot commented Jan 4, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 945fa45 🚫 Skipped No files need to be tested {"docker-compose/local/.env.example":"target file(docker-compose/local/.env.example) not in work scope \n include: /*.ts,/.tsx,**/.js,/*.jsx \n exclude: node_modules,/.test.ts,**/.test.tsx,/*.spec.ts,/.spec.tsx,**/.d.ts,/*.test.js,/.spec.js","docker-compose/local/.env.zh-CN.example":"target file(docker-compose/local/.env.zh-CN.example) not in work scope \n include: **/.ts,/*.tsx,/.js,**/.jsx \n exclude: node_modules,/*.test.ts,/.test.tsx,**/.spec.ts,/*.spec.tsx,/.d.ts,**/.test.js,/.spec.js","docker-compose/local/docker-compose.yml":"target file(docker-compose/local/docker-compose.yml) not in work scope \n include: **/.ts,/.tsx,**/.js,/*.jsx \n exclude: node_modules,/.test.ts,**/.test.tsx,/*.spec.ts,/.spec.tsx,**/.d.ts,/*.test.js,/.spec.js","docker-compose/local/init_data.json":"target file(docker-compose/local/init_data.json) not in work scope \n include: **/.ts,/*.tsx,/.js,**/.jsx \n exclude: node_modules,/*.test.ts,/.test.tsx,**/.spec.ts,/*.spec.tsx,/.d.ts,**/.test.js,/.spec.js","docker-compose/local/setup.sh":"target file(docker-compose/local/setup.sh) not in work scope \n include: **/.ts,/.tsx,**/.js,/*.jsx \n exclude: node_modules,/.test.ts,**/.test.tsx,/*.spec.ts,/.spec.tsx,**/.d.ts,/*.test.js,/*.spec.js"}

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@lobehubbot
Copy link
Member

👍 @cy948

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@cy948 cy948 changed the title ♻️ Refactor: start minio more gratefully ♻️ Refactor: start minio more gratefully in setup.sh Jan 4, 2025
@cy948 cy948 force-pushed the refactor/minio-pswd branch from 945fa45 to 5f469c0 Compare January 4, 2025 12:15
Copy link

codecov bot commented Jan 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.09%. Comparing base (f3fdee7) to head (9d3a635).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5290      +/-   ##
==========================================
- Coverage   92.10%   92.09%   -0.01%     
==========================================
  Files         572      572              
  Lines       44167    44167              
  Branches     3923     2758    -1165     
==========================================
- Hits        40678    40677       -1     
- Misses       3489     3490       +1     
Flag Coverage Δ
app 92.09% <ø> (-0.01%) ⬇️
server 97.70% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cy948 cy948 marked this pull request as ready for review January 4, 2025 12:36
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants