-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
✨ feat: support server db mode with Postgres / Drizzle ORM / tRPC #2556
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
👍 @arvinxx Thank you for raising your pull request and contributing to our Community |
目前是可以配置服务端数据库了吗 |
Is it possible to configure the server database now? |
@cfwl1111 等这个 PR 合并后,就可以了 |
@cfwl1111 After this PR is merged, it will be fine |
Important Review SkippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
服务端 Postgres 准备好了,期待它的到来 |
Server-side Postgres is ready and looking forward to its arrival |
图片的保存可以考虑支持直接存储在PostgreSQL数据库中。自部署还需要单独起一个S3兼容的后端服务管理起来更复杂,特别是大部分自部署用户的使用强度不是那么高,使用数据库完全没问题。 |
The saving of pictures can be considered to be directly stored in the PostgreSQL database. Self-deployment also requires a separate S3-compatible back-end service, which is more complicated to manage, especially since most self-deployment users are not so intensive in usage, and there is no problem using the database. |
不建议,后面还要支持各种文件上传的。如果不想承担这个复杂度,要么仍然可以用客户端数据库db的模式,不需要s3。 或者用未来我们host的cloud 版 |
Not recommended, it will support various file uploads later. If you don’t want to bear this complexity, you can either use the locally deployed version without s3, or use the cloud version of our host in the future. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2556 +/- ##
==========================================
- Coverage 94.04% 93.20% -0.84%
==========================================
Files 357 380 +23
Lines 20770 23694 +2924
Branches 2488 1872 -616
==========================================
+ Hits 19533 22085 +2552
- Misses 1237 1609 +372
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
整体进展
LobeChat 服务端 DB 版本功能实现,目前完成度为 100% 。
Note
由于之前并没有写过 SQL 和 Postgres ,所以可能整体服务端实现上仍然存在瑕疵,也可能存在 critical 的问题, 欢迎大家点评指正。
技术栈
由于基于 Drizzle ORM, 非常期待看到未来拓展到其他 Postgres DB、甚至 SQLite、MySQL 。 以及有待 @cy948 帮忙实现 next-auth 相关的 db 鉴权方案。
待解决工程问题
工程链路上还有两个问题待解决:
服务端相关的配置
📝 补充信息 | Additional Information