Closed weiben1989 closed 4 months ago
👀 @weiben1989
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
我也遇到这个问题,但是查一下历史Issue得知Docker好像不支持NEXT_PUBLIC_XXX这个变量,只能Vercel部署。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I also encountered this problem, but after checking the issue history, I learned that Docker does not seem to support the NEXT_PUBLIC_XXX variable and can only be deployed by Vercel.
我也遇到这个问题,但是查一下历史Issue得知Docker好像不支持NEXT_PUBLIC_XXX这个变量,只能Vercel部署。
我折腾了一天半,这仿佛是一个噩耗~~
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I also encountered this problem, but after checking the issue history, I learned that Docker does not seem to support the NEXT_PUBLIC_XXX variable and can only be deployed by Vercel.
I've been struggling for a day and a half, and this seems like bad news~~
我也遇到这个问题,但是查一下历史Issue得知Docker好像不支持NEXT_PUBLIC_XXX这个变量,只能Vercel部署。
你现在解决了这个验证问题没~哈哈
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I also encountered this problem, but after checking the issue history, I learned that Docker does not seem to support the NEXT_PUBLIC_XXX variable and can only be deployed by Vercel.
Have you solved this verification problem now? Haha
我也遇到这个问题,但是查一下历史Issue得知Docker好像不支持NEXT_PUBLIC_XXX这个变量,只能Vercel部署。
不是不支持,是NEXT_PUBLIC_XXX变量必须在构建时就注入docker镜像,直接拉取官方镜像,在启动容器时设置NEXT_PUBLIC_XXX变量值是不可行的。 目前,如果你想要使用docker方式运行lobechat cloud版,你需要自己构建镜像(在构建时就在dockerfile中声明并赋值所有cloud版lobechat所需的环境变量)。或者拉取官方镜像后,以官方镜像为基础设置新的环境变量(构建参数)再构建一个新的镜像应该也是可行的。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I also encountered this problem, but after checking the issue history, I learned that Docker does not seem to support the NEXT_PUBLIC_XXX variable and can only be deployed by Vercel.
It's not that it's not supported, it's that the NEXT_PUBLIC_XXX variable must be injected into the docker image during construction. It is not feasible to directly pull the official image. It is not feasible to set the NEXT_PUBLIC_XXX variable value when starting the container. Currently, if you want to use docker to run the cloud version of lobechat, you need to build the image yourself (declare and assign all environment variables required by the cloud version of lobechat in the dockerfile when building). Or after pulling the official image, it should be feasible to set new environment variables (build parameters) based on the official image and then build a new image.
我也遇到这个问题,但是查一下历史Issue得知Docker好像不支持NEXT_PUBLIC_XXX这个变量,只能Vercel部署。
不是不支持,是NEXT_PUBLIC_XXX变量必须在构建时就注入docker镜像,直接拉取官方镜像,在启动容器时设置NEXT_PUBLIC_XXX变量值是不可行的。 目前,如果你想要使用docker方式运行lobechat cloud版,你需要自己构建镜像(在构建时就在dockerfile中声明并赋值所有cloud版lobechat所需的环境变量)。或者拉取官方镜像后,以官方镜像为基础设置新的环境变量(构建参数)再构建一个新的镜像应该也是可行的。
你好啊,我让ai帮我理解了一下是这么个意思吗?
已知情况
需要在 Docker 构建时注入 NEXTPUBLIC 环境变量。 直接使用官方镜像,并在运行时设置 NEXTPUBLIC 变量是不可行的。 需要构建自定义的 Docker 镜像,并在构建时声明并赋值所有环境变量。
当前问题
如何在 Docker 构建时注入 NEXTPUBLIC 环境变量。 确保自定义镜像可以在运行时正确工作。
解决方案
在 Dockerfile 中声明和设置环境变量: 使用 ARG 和 ENV 指令在 Dockerfile 中设置环境变量。 构建自定义 Docker 镜像: 使用 docker build 命令,在构建时传入环境变量值。 运行 Docker 容器: 确保其他非 NEXTPUBLIC 变量在运行时通过 -e 选项传递。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I also encountered this problem, but after checking the historical issues, I found that Docker does not seem to support the NEXT_PUBLIC_XXX variable and can only be deployed by Vercel.
It’s not that it’s not supported, it’s that the NEXT_PUBLIC_XXX variable must be injected into the docker image during construction. It is not feasible to directly pull the official image. It is not feasible to set the NEXT_PUBLIC_XXX variable value when starting the container. Currently, if you want to use docker to run the cloud version of lobechat, you need to build the image yourself (declare and assign all environment variables required by the cloud version of lobechat in the dockerfile when building). Or after pulling the official image, it should be feasible to set new environment variables (build parameters) based on the official image and then build a new image.
Hello, I asked AI to help me understand. Is this what it means?
Known situation
The NEXTPUBLIC environment variable needs to be injected during Docker build. It is not feasible to use the official image directly and set the NEXTPUBLIC variable at runtime. You need to build a custom Docker image and declare and assign all environment variables at build time.
Current Issue
How to inject NEXTPUBLIC environment variable during Docker build. Make sure the custom image works correctly at runtime.
solution
Declare and set environment variables in the Dockerfile: Set environment variables in Dockerfile using ARG and ENV directives. Build a custom Docker image: Use the docker build command to pass in the environment variable value when building. Run the Docker container: Ensure that other non-NEXTPUBLIC variables are passed with the -e option at runtime.
我也遇到这个问题,但是查一下历史Issue得知Docker好像不支持NEXT_PUBLIC_XXX这个变量,只能Vercel部署。
不是不支持,是NEXT_PUBLIC_XXX变量必须在构建时就注入docker镜像,直接拉取官方镜像,在启动容器时设置NEXT_PUBLIC_XXX变量值是不可行的。 目前,如果你想要使用docker方式运行lobechat cloud版,你需要自己构建镜像(在构建时就在dockerfile中声明并赋值所有cloud版lobechat所需的环境变量)。或者拉取官方镜像后,以官方镜像为基础设置新的环境变量(构建参数)再构建一个新的镜像应该也是可行的。
你好啊,我让ai帮我理解了一下是这么个意思吗?
已知情况
需要在 Docker 构建时注入 NEXTPUBLIC 环境变量。 直接使用官方镜像,并在运行时设置 NEXTPUBLIC 变量是不可行的。 需要构建自定义的 Docker 镜像,并在构建时声明并赋值所有环境变量。
当前问题
如何在 Docker 构建时注入 NEXTPUBLIC 环境变量。 确保自定义镜像可以在运行时正确工作。
解决方案
在 Dockerfile 中声明和设置环境变量: 使用 ARG 和 ENV 指令在 Dockerfile 中设置环境变量。 构建自定义 Docker 镜像: 使用 docker build 命令,在构建时传入环境变量值。 运行 Docker 容器: 确保其他非 NEXTPUBLIC 变量在运行时通过 -e 选项传递。
差不多可以这么理解把
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I also encountered this problem, but after checking the historical issues, I learned that Docker does not seem to support the NEXT_PUBLIC_XXX variable and can only be deployed by Vercel.
It's not that it's not supported, it's that the NEXT_PUBLIC_XXX variable must be injected into the docker image during construction. It is not feasible to directly pull the official image. It is not feasible to set the NEXT_PUBLIC_XXX variable value when starting the container. Currently, if you want to use docker to run the cloud version of lobechat, you need to build the image yourself (declare and assign all environment variables required by the cloud version of lobechat in the dockerfile when building). Or after pulling the official image, it should be feasible to set new environment variables (build parameters) based on the official image and then build a new image.
Hello, I asked AI to help me understand. Is this what it means?
Known Situation
The NEXTPUBLIC environment variable needs to be injected when Docker is built. It is not feasible to use the official image directly and set the NEXTPUBLIC variable at runtime. You need to build a custom Docker image and declare and assign all environment variables when building.
Current Issues
How to inject NEXTPUBLIC environment variable during Docker build. Make sure the custom image works correctly at runtime.
Solution
Declare and set environment variables in the Dockerfile: Set environment variables in the Dockerfile using the ARG and ENV directives. Build a custom Docker image: Use the docker build command to pass in the environment variable value when building. Run the Docker container: Ensure that other non-NEXTPUBLIC variables are passed with the -e option at runtime.
You can almost understand it this way
把
还是失败了,没有一点耐心了。哈哈
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Put
Still failed, no more patience. Ha ha
把
还是失败了,没有一点耐心了。哈哈
是可行的,我是通过拉取仓库再在本地构建的方式自部署了cloud版lobechat。只不过这个过程也有一些需要注意的tips。如果没有这方面经验的话,可以等待后续开发者(可能会出)的cloud版镜像,会方便很多。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Put
Still failed, no more patience. Ha ha
It is feasible. I self-deployed the cloud version of lobechat by pulling the warehouse and building it locally. However, there are some tips that need to be paid attention to during this process. If you have no experience in this area, you can wait for the cloud version image from subsequent developers (which may be released), which will be much more convenient.
可以等待后续开发者(可能会出)的cloud版镜像,会方便很多
会出的,等 @cy948 的接入 next-auth 的 pr #2935 合并以后,会给一个 server db 版本的镜像
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
You can wait for the cloud version image from subsequent developers (which may be released), which will be much more convenient.
It will come out. After @cy948's PR #2935 for accessing next-auth is merged, a server db version of the image will be available.
可以等待后续开发者(可能会出)的cloud版镜像,会方便很多
会出的,等 @cy948 的接入 next-auth 的 pr #2935 合并以后,会给一个 server db 版本的镜像
好的好的,期待住了!感谢(^🙏^)
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
You can wait for the cloud version image from subsequent developers (which may be released), which will be much more convenient.
It will come out. After @cy948's PR #2935 for accessing next-auth is merged, a server db version of the image will be available.
Okay, okay, looking forward to it! Thanks (^🙏^)
✅ @weiben1989
This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。
📝 Reference
https://github.com/lobehub/lobe-chat/tree/main/docs/self-hosting/advanced/authentication.zh-CN.mdx
🐛 Feedback
Your response
在lobechat里面设置 clerk的问题, 首先我拿到了clerk得apikey,然后在nano.env 里面添加的了 两个key 还有 openai的key 再然后 运行 docker stop lobe-chat docker rm lobe-chat docker run -d -p 3210:3210 \ --env-file .env \ --name lobe-chat \ lobehub/lobe-chat:latest
可以最后访问显示的是 Application error: a client-side exception has occurred (see the browser console for more information). 说的问题是 Missing publishableKey 的错误 头大了 求助