Clerk and Docker? #4516
-
According to ticket #2937 , as docker don't support NEXT_PUBLIC_XXX env variables, clerk can't work in Docker. But the ClerkProvider component do accept parameters, and allow to provide the publishableKey as a parameter. So it could allow to provide the publishable key from another ENV variable than the default one (for example CLERK_PUBLISHABLE_KEY)
Could be a solution to this problem and allow to use docker? Did anyone tried that solution? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Not support. We need another env the |
Beta Was this translation helpful? Give feedback.
-
If you want to use Clerk, you need to build the Docker image yourself. It works great, but the image needs to be rebuilt every time there's an update, which is a bit troublesome. |
Beta Was this translation helpful? Give feedback.
Not support. We need another env
NEXT_PUBLIC_ENABLE_CLERK_AUTH
to check whether to use Clerk: https://github.com/lobehub/lobe-chat/blob/main/src/layout/AuthProvider/index.tsx#L9-L14the
NEXT_PUBLIC_ENABLE_CLERK_AUTH
is used outside the React runtime. So the ClerkProvider's props is not enough.