关于Postgresql 配置问题 #4202
-
🥰 需求描述请问用阿里云或者AMS的Postgresql 服务的人,大家是怎么配置vercel部署的啊?配置了很久都在报错,显示的是连接不到; 🧐 解决方案有没有成功配置的,或者有其他比较好的解决方法的?想通过vercel配置服务端的lobechat,但是Postgresql一直没解决,本人对数据库的知识比较欠缺,求各位指点 📝 补充信息No response |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 2 replies
-
🥰 Description of requirementsFor those who use Alibaba Cloud or AMS's Postgresql service, how do you configure vercel deployment? After configuring for a long time, I still get an error, showing that the connection cannot be made; 🧐 SolutionHas anyone configured it successfully, or is there any other better solution? I want to configure the server-side lobechat through vercel, but Postgresql has not been able to solve it. I have a lack of knowledge about databases. Please give me some advice. 📝 Supplementary informationNo response |
Beta Was this translation helpful? Give feedback.
-
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
Hey @Forone-Shijie, I'm here to help you with your Postgresql configuration questions. I'm a bot that can help you solve bugs, answer questions, and become a contributor. Let's figure this out together! 我找到了两个类似的已关闭问题,可能对你有帮助:
关于在Vercel上配置PostgreSQL的具体步骤,可以参考以下内容:
总结所需的环境变量: APP_URL=https://your-project.com
# 指定服务模式为server
NEXT_PUBLIC_SERVICE_MODE=server
# Postgres数据库URL
DATABASE_URL=your_database_url
KEY_VAULTS_SECRET=your_generated_key_vaults_secret
# Clerk相关配置
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx
CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx
CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx
# S3相关配置
# S3密钥
S3_ACCESS_KEY_ID=your_s3_access_key_id
S3_SECRET_ACCESS_KEY=your_s3_secret_access_key
# 桶名称
S3_BUCKET=lobechat
# 桶请求端点
S3_ENDPOINT=https://your_s3_endpoint
# 桶的公共访问域
S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
# 桶区域,如us-west-1,一般不需要添加,但某些服务提供商可能需要配置
# S3_REGION=us-west-1 确保在部署前将这些环境变量添加到Vercel中,以避免数据库迁移问题[1]。 希望这些信息对你有所帮助! |
Beta Was this translation helpful? Give feedback.
-
用vercel的Postgresql 不行吗? |
Beta Was this translation helpful? Give feedback.
-
先使用 Navicat 工具本地看下是否可以连接到;确保外网可访问。 阿里云示例: 按照上述流程购买公网IP然后绑定到你的VPC网络上,再试下看看。 |
Beta Was this translation helpful? Give feedback.
-
直接用supabase 秒配置成功 |
Beta Was this translation helpful? Give feedback.
-
Directly use supabase to configure successfully in seconds |
Beta Was this translation helpful? Give feedback.
-
要记得配置 |
Beta Was this translation helpful? Give feedback.
-
我用阿里云的postgres成功了,DATABASE_DRIVER=node要配置,详见图片。 |
Beta Was this translation helpful? Give feedback.
先使用 Navicat 工具本地看下是否可以连接到;确保外网可访问。
阿里云示例:
按照上述流程购买公网IP然后绑定到你的VPC网络上,再试下看看。