-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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
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. |
### [Version 0.162.25](v0.162.24...v0.162.25) <sup>Released on **2024-06-16**</sup> #### 🐛 Bug Fixes - **misc**: Fix issues for client fetch. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Fix issues for client fetch, closes [#2753](#2753) ([6f5be5d](6f5be5d)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
❤️ Great PR @arvinxx ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
## [Version 0.163.0](v0.162.25...v0.163.0) <sup>Released on **2024-06-17**</sup> #### ✨ Features - **misc**: Support server db mode with Postgres / Drizzle ORM / tRPC. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Support server db mode with Postgres / Drizzle ORM / tRPC, closes [#2556](#2556) ([b26afbf](b26afbf)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
这个新特性是不是在文档中没有更新?
这个又应该如何配置? |
Is this new feature not updated in the documentation?
How should this be configured? |
## [Version 1.43.0](v1.42.19...v1.43.0) <sup>Released on **2024-06-17**</sup> #### ✨ Features - **misc**: Release LobeChat 1.0, support server db mode with Postgres / Drizzle ORM / tRPC. #### 💄 Styles - **misc**: Remove r2 cdn url. #### 🔧 Chores - **misc**: Bump version. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Release LobeChat 1.0, closes [lobehub#2897](https://github.com/bentwnghk/lobe-chat/issues/2897) ([97bb377](97bb377)) * **misc**: Support server db mode with Postgres / Drizzle ORM / tRPC, closes [lobehub#2556](https://github.com/bentwnghk/lobe-chat/issues/2556) ([b26afbf](b26afbf)) #### Styles * **misc**: Remove r2 cdn url, closes [lobehub#2878](https://github.com/bentwnghk/lobe-chat/issues/2878) ([19fd4d5](19fd4d5)) #### Chores * **misc**: Bump version, closes [lobehub#2896](https://github.com/bentwnghk/lobe-chat/issues/2896) ([6e2d03b](6e2d03b)) </details> #### 💥 BREAKING CHANGES * **misc**: Update LICENSE to Apache 2.0 * **misc**: update to 1.0.0 <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
CLERK_WEBHOOK_SECRET这个配置后是否需要去clerk配置Endpoint?我clerk的相关密钥已经做了配置,用户也可以登录,但是我查看数据库并没有新建clerk的用户信息,现在我的项目完全无法使用。 |
After configuring CLERK_WEBHOOK_SECRET, do I need to go to clerk to configure the Endpoint? The relevant keys of my clerk have been configured and users can log in, but when I checked the database, there was no new user information for the clerk. Now my project is completely unusable. |
需要的,类似这样: @ZeroDeng01 @xingpingcn 目前文档还没完善,有问题可以在 Discord 里咨询,我们这几天会把部署指南补充完善 |
该部分工作是否有相关联的 issue/discussion/pull request ? |
Is there an associated issue/discussion/pull request for this part of the work? |
@cy948 感觉可以先写一篇 RFC 来讨论下? |
@cy948 I feel like I can write an RFC to discuss it first? |
@arvinxx 我试完第一个方案之后写个rfc描述下现在的情况吧 |
@arvinxx After I try the first solution, I will write an RFC to describe the current situation. |
用上数据库了,朋友也注册我的网站,体验很棒~ |
I have used the database and my friends have also registered on my website. The experience is great~ |
分享下 教程,谢谢! |
Share the tutorial, thank you! |
## [Version 0.163.0](lobehub/lobe-chat@v0.162.25...v0.163.0) <sup>Released on **2024-06-17**</sup> #### ✨ Features - **misc**: Support server db mode with Postgres / Drizzle ORM / tRPC. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's improved * **misc**: Support server db mode with Postgres / Drizzle ORM / tRPC, closes [lobehub#2556](lobehub#2556) ([b26afbf](lobehub@b26afbf)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
整体进展
LobeChat 服务端 DB 版本功能实现,目前完成度为 100% 。
Note
由于之前并没有写过 SQL 和 Postgres ,所以可能整体服务端实现上仍然存在瑕疵,也可能存在 critical 的问题, 欢迎大家点评指正。
技术栈
由于基于 Drizzle ORM, 非常期待看到未来拓展到其他 Postgres DB、甚至 SQLite、MySQL 。 以及有待 @cy948 帮忙实现 next-auth 相关的 db 鉴权方案。
待解决工程问题
工程链路上还有两个问题待解决:
服务端相关的配置
📝 补充信息 | Additional Information