@lobehub/chat 1.44.3 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.remarkrc.mdx.js +6 -0
- package/CHANGELOG.md +25 -0
- package/changelog/v1.json +9 -0
- package/docs/changelog/2023-09-09-plugin-system.mdx +5 -0
- package/docs/changelog/2023-09-09-plugin-system.zh-CN.mdx +5 -0
- package/docs/changelog/2023-11-14-gpt4-vision.mdx +6 -0
- package/docs/changelog/2023-11-14-gpt4-vision.zh-CN.mdx +6 -0
- package/docs/changelog/2023-11-19-tts-stt.mdx +6 -0
- package/docs/changelog/2023-11-19-tts-stt.zh-CN.mdx +7 -0
- package/docs/changelog/2023-12-22-dalle-3.mdx +6 -0
- package/docs/changelog/2023-12-22-dalle-3.zh-CN.mdx +4 -0
- package/docs/changelog/2024-02-08-sso-oauth.mdx +6 -0
- package/docs/changelog/2024-02-08-sso-oauth.zh-CN.mdx +6 -0
- package/docs/changelog/2024-02-14-ollama.mdx +6 -0
- package/docs/changelog/2024-02-14-ollama.zh-CN.mdx +5 -0
- package/docs/changelog/2024-06-19-lobe-chat-v1.mdx +6 -0
- package/docs/changelog/2024-06-19-lobe-chat-v1.zh-CN.mdx +5 -0
- package/docs/changelog/2024-07-19-gpt-4o-mini.mdx +5 -0
- package/docs/changelog/2024-07-19-gpt-4o-mini.zh-CN.mdx +4 -0
- package/docs/changelog/2024-08-02-lobe-chat-database-docker.mdx +6 -0
- package/docs/changelog/2024-08-02-lobe-chat-database-docker.zh-CN.mdx +5 -0
- package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.mdx +6 -0
- package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.zh-CN.mdx +5 -0
- package/docs/changelog/2024-09-13-openai-o1-models.mdx +6 -0
- package/docs/changelog/2024-09-13-openai-o1-models.zh-CN.mdx +6 -0
- package/docs/changelog/2024-09-20-artifacts.mdx +6 -0
- package/docs/changelog/2024-09-20-artifacts.zh-CN.mdx +6 -0
- package/docs/changelog/2024-10-27-pin-assistant.mdx +5 -0
- package/docs/changelog/2024-10-27-pin-assistant.zh-CN.mdx +4 -0
- package/docs/changelog/2024-11-06-share-text-json.mdx +4 -0
- package/docs/changelog/2024-11-06-share-text-json.zh-CN.mdx +4 -0
- package/docs/changelog/2024-11-25-november-providers.mdx +7 -0
- package/docs/changelog/2024-11-25-november-providers.zh-CN.mdx +7 -0
- package/docs/changelog/2024-11-27-forkable-chat.mdx +4 -0
- package/docs/changelog/2024-11-27-forkable-chat.zh-CN.mdx +5 -0
- package/docs/changelog/2025-01-03-user-profile.mdx +5 -0
- package/docs/changelog/2025-01-03-user-profile.zh-CN.mdx +4 -1
- package/docs/self-hosting/advanced/auth/clerk.mdx +25 -41
- package/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx +23 -37
- package/docs/self-hosting/advanced/auth/next-auth/auth0.mdx +31 -58
- package/docs/self-hosting/advanced/auth/next-auth/auth0.zh-CN.mdx +30 -57
- package/docs/self-hosting/advanced/auth/next-auth/authelia.mdx +38 -38
- package/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx +37 -38
- package/docs/self-hosting/advanced/auth/next-auth/authentik.mdx +26 -31
- package/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx +25 -30
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +74 -75
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +72 -73
- package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.mdx +24 -25
- package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx +23 -24
- package/docs/self-hosting/advanced/auth/next-auth/github.mdx +46 -73
- package/docs/self-hosting/advanced/auth/next-auth/github.zh-CN.mdx +43 -70
- package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +28 -37
- package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +28 -37
- package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.mdx +36 -49
- package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.zh-CN.mdx +30 -43
- package/docs/self-hosting/advanced/auth/next-auth/wechat.mdx +13 -14
- package/docs/self-hosting/advanced/auth/next-auth/wechat.zh-CN.mdx +14 -15
- package/docs/self-hosting/advanced/auth/next-auth/zitadel.mdx +35 -69
- package/docs/self-hosting/advanced/auth/next-auth/zitadel.zh-CN.mdx +34 -68
- package/docs/self-hosting/advanced/auth.mdx +14 -13
- package/docs/self-hosting/advanced/auth.zh-CN.mdx +15 -14
- package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +15 -15
- package/docs/self-hosting/advanced/knowledge-base.mdx +14 -3
- package/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx +12 -3
- package/docs/self-hosting/advanced/model-list.zh-CN.mdx +5 -5
- package/docs/self-hosting/advanced/s3/cloudflare-r2.mdx +52 -81
- package/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx +51 -80
- package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +20 -34
- package/docs/self-hosting/advanced/s3/tencent-cloud.zh-CN.mdx +28 -43
- package/docs/self-hosting/advanced/s3.mdx +30 -34
- package/docs/self-hosting/advanced/s3.zh-CN.mdx +28 -33
- package/docs/self-hosting/advanced/settings-url-share.mdx +6 -6
- package/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx +19 -19
- package/docs/self-hosting/advanced/upstream-sync.mdx +73 -89
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +71 -87
- package/docs/self-hosting/advanced/webrtc.mdx +14 -21
- package/docs/self-hosting/advanced/webrtc.zh-CN.mdx +19 -26
- package/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +0 -3
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables/basic.mdx +13 -13
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +15 -15
- package/docs/self-hosting/environment-variables/model-provider.mdx +1 -1
- package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables/s3.mdx +3 -4
- package/docs/self-hosting/environment-variables/s3.zh-CN.mdx +5 -7
- package/docs/self-hosting/environment-variables.mdx +8 -4
- package/docs/self-hosting/environment-variables.zh-CN.mdx +4 -0
- package/docs/self-hosting/examples/azure-openai.mdx +9 -12
- package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +8 -11
- package/docs/self-hosting/examples/ollama.mdx +8 -7
- package/docs/self-hosting/examples/ollama.zh-CN.mdx +8 -7
- package/docs/self-hosting/platform/alibaba-cloud.mdx +5 -7
- package/docs/self-hosting/platform/alibaba-cloud.zh-CN.mdx +5 -7
- package/docs/self-hosting/platform/btpanel.mdx +3 -2
- package/docs/self-hosting/platform/btpanel.zh-CN.mdx +3 -3
- package/docs/self-hosting/platform/docker-compose.mdx +75 -85
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +75 -85
- package/docs/self-hosting/platform/docker.mdx +87 -92
- package/docs/self-hosting/platform/docker.zh-CN.mdx +96 -115
- package/docs/self-hosting/platform/netlify.mdx +44 -94
- package/docs/self-hosting/platform/netlify.zh-CN.mdx +40 -90
- package/docs/self-hosting/platform/railway.mdx +6 -7
- package/docs/self-hosting/platform/railway.zh-CN.mdx +6 -7
- package/docs/self-hosting/platform/repocloud.mdx +6 -7
- package/docs/self-hosting/platform/repocloud.zh-CN.mdx +6 -7
- package/docs/self-hosting/platform/sealos.mdx +6 -7
- package/docs/self-hosting/platform/sealos.zh-CN.mdx +6 -7
- package/docs/self-hosting/platform/vercel.mdx +7 -8
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +7 -8
- package/docs/self-hosting/platform/zeabur.mdx +29 -32
- package/docs/self-hosting/platform/zeabur.zh-CN.mdx +29 -32
- package/docs/self-hosting/server-database/docker-compose.mdx +44 -71
- package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +44 -71
- package/docs/self-hosting/server-database/docker.mdx +84 -88
- package/docs/self-hosting/server-database/docker.zh-CN.mdx +87 -91
- package/docs/self-hosting/server-database/dokploy.mdx +18 -1
- package/docs/self-hosting/server-database/dokploy.zh-CN.mdx +84 -68
- package/docs/self-hosting/server-database/repocloud.mdx +7 -9
- package/docs/self-hosting/server-database/repocloud.zh-CN.mdx +9 -11
- package/docs/self-hosting/server-database/vercel.mdx +158 -243
- package/docs/self-hosting/server-database/vercel.zh-CN.mdx +137 -205
- package/docs/self-hosting/server-database/zeabur.mdx +21 -23
- package/docs/self-hosting/server-database/zeabur.zh-CN.mdx +20 -22
- package/docs/self-hosting/server-database.mdx +34 -36
- package/docs/self-hosting/server-database.zh-CN.mdx +34 -37
- package/docs/self-hosting/start.mdx +1 -4
- package/docs/self-hosting/start.zh-CN.mdx +1 -1
- package/docs/usage/agents/agent-organization.mdx +5 -21
- package/docs/usage/agents/agent-organization.zh-CN.mdx +5 -21
- package/docs/usage/agents/concepts.mdx +4 -4
- package/docs/usage/agents/concepts.zh-CN.mdx +4 -4
- package/docs/usage/agents/custom-agent.mdx +2 -2
- package/docs/usage/agents/custom-agent.zh-CN.mdx +2 -2
- package/docs/usage/agents/model.mdx +4 -4
- package/docs/usage/agents/model.zh-CN.mdx +6 -6
- package/docs/usage/agents/prompt.mdx +5 -6
- package/docs/usage/agents/prompt.zh-CN.mdx +5 -6
- package/docs/usage/agents/topics.mdx +2 -2
- package/docs/usage/agents/topics.zh-CN.mdx +2 -2
- package/docs/usage/features/agent-market.mdx +2 -2
- package/docs/usage/features/agent-market.zh-CN.mdx +2 -2
- package/docs/usage/features/auth.mdx +1 -5
- package/docs/usage/features/auth.zh-CN.mdx +1 -5
- package/docs/usage/features/database.mdx +1 -5
- package/docs/usage/features/database.zh-CN.mdx +1 -5
- package/docs/usage/features/local-llm.mdx +2 -6
- package/docs/usage/features/local-llm.zh-CN.mdx +2 -6
- package/docs/usage/features/mobile.mdx +1 -5
- package/docs/usage/features/mobile.zh-CN.mdx +1 -5
- package/docs/usage/features/multi-ai-providers.mdx +3 -11
- package/docs/usage/features/multi-ai-providers.zh-CN.mdx +3 -11
- package/docs/usage/features/plugin-system.mdx +9 -10
- package/docs/usage/features/plugin-system.zh-CN.mdx +9 -10
- package/docs/usage/features/pwa.mdx +11 -25
- package/docs/usage/features/pwa.zh-CN.mdx +11 -25
- package/docs/usage/features/text-to-image.mdx +2 -2
- package/docs/usage/features/text-to-image.zh-CN.mdx +2 -2
- package/docs/usage/features/theme.mdx +1 -6
- package/docs/usage/features/theme.zh-CN.mdx +1 -6
- package/docs/usage/features/tts.mdx +3 -7
- package/docs/usage/features/tts.zh-CN.mdx +3 -7
- package/docs/usage/features/vision.mdx +2 -2
- package/docs/usage/features/vision.zh-CN.mdx +2 -2
- package/docs/usage/foundation/basic.mdx +7 -18
- package/docs/usage/foundation/basic.zh-CN.mdx +6 -16
- package/docs/usage/foundation/share.mdx +3 -13
- package/docs/usage/foundation/share.zh-CN.mdx +3 -13
- package/docs/usage/foundation/text2image.mdx +3 -12
- package/docs/usage/foundation/text2image.zh-CN.mdx +3 -12
- package/docs/usage/foundation/translate.mdx +3 -13
- package/docs/usage/foundation/translate.zh-CN.mdx +3 -13
- package/docs/usage/foundation/tts-stt.mdx +3 -12
- package/docs/usage/foundation/tts-stt.zh-CN.mdx +3 -12
- package/docs/usage/foundation/vision.mdx +4 -16
- package/docs/usage/foundation/vision.zh-CN.mdx +4 -16
- package/docs/usage/plugins/basic-usage.mdx +7 -30
- package/docs/usage/plugins/basic-usage.zh-CN.mdx +7 -30
- package/docs/usage/plugins/development.mdx +30 -78
- package/docs/usage/plugins/development.zh-CN.mdx +31 -79
- package/docs/usage/plugins/store.mdx +2 -10
- package/docs/usage/plugins/store.zh-CN.mdx +2 -10
- package/docs/usage/providers/ai21.mdx +17 -33
- package/docs/usage/providers/ai21.zh-CN.mdx +17 -33
- package/docs/usage/providers/ai360.mdx +17 -33
- package/docs/usage/providers/ai360.zh-CN.mdx +20 -36
- package/docs/usage/providers/anthropic.mdx +23 -45
- package/docs/usage/providers/anthropic.zh-CN.mdx +22 -44
- package/docs/usage/providers/azure.mdx +21 -51
- package/docs/usage/providers/azure.zh-CN.mdx +19 -48
- package/docs/usage/providers/baichuan.mdx +16 -34
- package/docs/usage/providers/baichuan.zh-CN.mdx +15 -33
- package/docs/usage/providers/bedrock.mdx +38 -87
- package/docs/usage/providers/bedrock.zh-CN.mdx +37 -86
- package/docs/usage/providers/cloudflare.mdx +25 -48
- package/docs/usage/providers/cloudflare.zh-CN.mdx +24 -45
- package/docs/usage/providers/deepseek.mdx +25 -51
- package/docs/usage/providers/deepseek.zh-CN.mdx +24 -50
- package/docs/usage/providers/fireworksai.mdx +23 -43
- package/docs/usage/providers/fireworksai.zh-CN.mdx +21 -41
- package/docs/usage/providers/gemini.mdx +20 -46
- package/docs/usage/providers/gemini.zh-CN.mdx +20 -46
- package/docs/usage/providers/giteeai.mdx +24 -45
- package/docs/usage/providers/giteeai.zh-CN.mdx +22 -43
- package/docs/usage/providers/github.mdx +19 -45
- package/docs/usage/providers/github.zh-CN.mdx +19 -44
- package/docs/usage/providers/groq.mdx +12 -29
- package/docs/usage/providers/groq.zh-CN.mdx +11 -28
- package/docs/usage/providers/hunyuan.mdx +19 -39
- package/docs/usage/providers/hunyuan.zh-CN.mdx +18 -38
- package/docs/usage/providers/internlm.mdx +21 -38
- package/docs/usage/providers/internlm.zh-CN.mdx +19 -36
- package/docs/usage/providers/minimax.mdx +24 -50
- package/docs/usage/providers/minimax.zh-CN.mdx +22 -48
- package/docs/usage/providers/mistral.mdx +21 -39
- package/docs/usage/providers/mistral.zh-CN.mdx +20 -38
- package/docs/usage/providers/moonshot.mdx +20 -38
- package/docs/usage/providers/moonshot.zh-CN.mdx +19 -37
- package/docs/usage/providers/novita.mdx +20 -43
- package/docs/usage/providers/novita.zh-CN.mdx +19 -42
- package/docs/usage/providers/ollama/gemma.mdx +12 -29
- package/docs/usage/providers/ollama/gemma.zh-CN.mdx +12 -30
- package/docs/usage/providers/ollama/qwen.mdx +17 -32
- package/docs/usage/providers/ollama/qwen.zh-CN.mdx +12 -27
- package/docs/usage/providers/ollama.mdx +67 -99
- package/docs/usage/providers/ollama.zh-CN.mdx +67 -99
- package/docs/usage/providers/openai.mdx +42 -56
- package/docs/usage/providers/openai.zh-CN.mdx +39 -52
- package/docs/usage/providers/openrouter.mdx +48 -84
- package/docs/usage/providers/openrouter.zh-CN.mdx +31 -67
- package/docs/usage/providers/perplexity.mdx +16 -34
- package/docs/usage/providers/perplexity.zh-CN.mdx +16 -34
- package/docs/usage/providers/qwen.mdx +26 -52
- package/docs/usage/providers/qwen.zh-CN.mdx +25 -51
- package/docs/usage/providers/sensenova.mdx +24 -45
- package/docs/usage/providers/sensenova.zh-CN.mdx +22 -43
- package/docs/usage/providers/siliconcloud.mdx +17 -33
- package/docs/usage/providers/siliconcloud.zh-CN.mdx +17 -33
- package/docs/usage/providers/spark.mdx +20 -40
- package/docs/usage/providers/spark.zh-CN.mdx +19 -39
- package/docs/usage/providers/stepfun.mdx +17 -35
- package/docs/usage/providers/stepfun.zh-CN.mdx +17 -35
- package/docs/usage/providers/taichu.mdx +16 -34
- package/docs/usage/providers/taichu.zh-CN.mdx +15 -33
- package/docs/usage/providers/togetherai.mdx +18 -40
- package/docs/usage/providers/togetherai.zh-CN.mdx +18 -40
- package/docs/usage/providers/upstage.mdx +18 -34
- package/docs/usage/providers/upstage.zh-CN.mdx +17 -33
- package/docs/usage/providers/wenxin.mdx +22 -42
- package/docs/usage/providers/wenxin.zh-CN.mdx +20 -40
- package/docs/usage/providers/xai.mdx +21 -38
- package/docs/usage/providers/xai.zh-CN.mdx +20 -37
- package/docs/usage/providers/zeroone.mdx +22 -48
- package/docs/usage/providers/zeroone.zh-CN.mdx +22 -48
- package/docs/usage/providers/zhipu.mdx +17 -35
- package/docs/usage/providers/zhipu.zh-CN.mdx +18 -34
- package/docs/usage/providers.mdx +1 -6
- package/docs/usage/providers.zh-CN.mdx +1 -6
- package/docs/usage/start.mdx +4 -18
- package/docs/usage/start.zh-CN.mdx +2 -19
- package/docs/usage/tools-calling/anthropic.mdx +18 -51
- package/docs/usage/tools-calling/anthropic.zh-CN.mdx +22 -55
- package/docs/usage/tools-calling/google.mdx +16 -23
- package/docs/usage/tools-calling/google.zh-CN.mdx +17 -24
- package/docs/usage/tools-calling/groq.mdx +9 -0
- package/docs/usage/tools-calling/groq.zh-CN.mdx +44 -70
- package/docs/usage/tools-calling/moonshot.mdx +9 -0
- package/docs/usage/tools-calling/openai.mdx +19 -44
- package/docs/usage/tools-calling/openai.zh-CN.mdx +20 -45
- package/docs/usage/tools-calling.mdx +9 -0
- package/docs/usage/tools-calling.zh-CN.mdx +60 -68
- package/package.json +42 -41
- package/scripts/mdxWorkflow/index.ts +7 -0
- package/src/app/(main)/(mobile)/me/(home)/features/Header.tsx +2 -1
- package/src/app/(main)/(mobile)/me/data/features/Header.tsx +1 -1
- package/src/app/(main)/(mobile)/me/profile/features/Header.tsx +1 -1
- package/src/app/(main)/(mobile)/me/settings/features/Header.tsx +1 -1
- package/src/app/(main)/@nav/_layout/Mobile.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/@topic/features/SystemRole/SystemRoleContent.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ByTimeMode/GroupItem.tsx +2 -2
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/index.tsx +1 -1
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/ChatHeaderTitle.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/index.tsx +1 -1
- package/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx +2 -1
- package/src/app/(main)/chat/settings/_layout/Desktop/Header.tsx +1 -1
- package/src/app/(main)/chat/settings/_layout/Mobile/Header.tsx +1 -1
- package/src/app/(main)/discover/(detail)/provider/[slug]/features/InfoSidebar/SuggestionItem.tsx +8 -6
- package/src/app/(main)/discover/(list)/_layout/Desktop/Nav.tsx +1 -1
- package/src/app/(main)/discover/(list)/_layout/Mobile/Header.tsx +2 -1
- package/src/app/(main)/discover/_layout/Desktop/Header.tsx +1 -1
- package/src/app/(main)/discover/components/VirtuosoGridList/index.tsx +9 -5
- package/src/app/(main)/discover/search/_layout/Mobile/Header.tsx +1 -1
- package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/EmptyStatus.tsx +21 -13
- package/src/app/(main)/repos/[id]/evals/evaluation/EvaluationList/index.tsx +1 -1
- package/src/app/(main)/settings/sync/features/DeviceInfo/SystemIcon.tsx +2 -0
- package/src/components/Branding/ProductLogo/Custom.tsx +19 -20
- package/src/components/BrowserIcon/index.tsx +19 -30
- package/src/components/BubblesLoading/index.tsx +31 -23
- package/src/components/FunctionModal/createModalHooks.ts +6 -3
- package/src/components/StopLoading.tsx +10 -7
- package/src/features/ChatInput/Desktop/InputArea/index.tsx +2 -2
- package/src/features/InitClientDB/EnableModal.tsx +2 -2
- package/src/features/InitClientDB/{PGliteSVG.tsx → PGliteIcon.tsx} +17 -11
- package/src/features/ShareModal/ShareImage/index.tsx +32 -22
- package/src/features/ShareModal/ShareJSON/Preview.tsx +2 -2
- package/src/features/ShareModal/ShareJSON/index.tsx +49 -37
- package/src/features/ShareModal/ShareText/Preview.tsx +4 -1
- package/src/features/ShareModal/ShareText/index.tsx +49 -38
- package/src/features/ShareModal/index.tsx +1 -1
- package/src/features/ShareModal/style.ts +30 -0
- package/src/utils/colorUtils.ts +1 -1
- package/src/components/BrowserIcon/components/Brave.tsx +0 -56
- package/src/components/BrowserIcon/components/Chrome.tsx +0 -14
- package/src/components/BrowserIcon/components/Chromium.tsx +0 -14
- package/src/components/BrowserIcon/components/Edge.tsx +0 -36
- package/src/components/BrowserIcon/components/Firefox.tsx +0 -38
- package/src/components/BrowserIcon/components/Opera.tsx +0 -19
- package/src/components/BrowserIcon/components/Safari.tsx +0 -23
- package/src/components/BrowserIcon/components/Samsung.tsx +0 -21
@@ -19,23 +19,19 @@ If you want to deploy LobeChat on Zeabur, you can follow the steps below:
|
|
19
19
|
<Steps>
|
20
20
|
### Prepare your OpenAI API Key
|
21
21
|
|
22
|
-
Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key.
|
22
|
+
Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key.
|
23
23
|
|
24
|
-
### Click the button below to deploy
|
24
|
+
### Click the button below to deploy
|
25
25
|
|
26
|
-
[![][deploy-button-image]][deploy-link]
|
26
|
+
[![][deploy-button-image]][deploy-link]
|
27
27
|
|
28
|
-
### Once deployed, you can start using it
|
28
|
+
### Once deployed, you can start using it
|
29
29
|
|
30
|
-
### Bind a custom domain (optional)
|
31
|
-
|
32
|
-
You can use the subdomain provided by Zeabur, or choose to bind a custom domain. Currently, the domains provided by Zeabur have not been contaminated, and most regions can connect directly.
|
30
|
+
### Bind a custom domain (optional)
|
33
31
|
|
32
|
+
You can use the subdomain provided by Zeabur, or choose to bind a custom domain. Currently, the domains provided by Zeabur have not been contaminated, and most regions can connect directly.
|
34
33
|
</Steps>
|
35
34
|
|
36
|
-
[deploy-button-image]: https://zeabur.com/button.svg
|
37
|
-
[deploy-link]: https://zeabur.com/templates/VZGGTI
|
38
|
-
|
39
35
|
# Deploy LobeChat with Zeabur as serverless function
|
40
36
|
|
41
37
|
> Note: There are still issues with [middlewares and rewrites of next.js on Zeabur](https://github.com/lobehub/lobe-chat/pull/2775?notification_referrer_id=NT_kwDOAdi2DrQxMDkyODQ4MDc2NTozMDk3OTU5OA#issuecomment-2146713899), use at your own risk!
|
@@ -45,40 +41,41 @@ Since Zeabur does NOT officially support FREE users deploy containerized service
|
|
45
41
|
## Zeabur Deployment Process
|
46
42
|
|
47
43
|
<Steps>
|
44
|
+
### Fork LobeChat
|
48
45
|
|
49
|
-
###
|
50
|
-
|
51
|
-
### Add Zeabur pack config file
|
46
|
+
### Add Zeabur pack config file
|
52
47
|
|
53
|
-
Add a `zbpack.json` configuration file with the following content to the root dir of your fork:
|
48
|
+
Add a `zbpack.json` configuration file with the following content to the root dir of your fork:
|
54
49
|
|
55
|
-
```json
|
56
|
-
{
|
57
|
-
|
58
|
-
|
59
|
-
}
|
60
|
-
```
|
50
|
+
```json
|
51
|
+
{
|
52
|
+
"ignore_dockerfile": true,
|
53
|
+
"serverless": true
|
54
|
+
}
|
55
|
+
```
|
61
56
|
|
62
|
-
### Prepare your OpenAI API Key
|
63
|
-
|
64
|
-
Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key.
|
57
|
+
### Prepare your OpenAI API Key
|
65
58
|
|
66
|
-
|
59
|
+
Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key.
|
67
60
|
|
68
|
-
|
61
|
+
### Login to your [Zeabur dashboard](https://dash.zeabur.com)
|
69
62
|
|
70
|
-
|
63
|
+
If you do not already have an account, you will need to register one.
|
71
64
|
|
72
|
-
Create a project
|
65
|
+
### Create a project and service
|
73
66
|
|
74
|
-
|
67
|
+
Create a project, then create a service under this project.
|
75
68
|
|
76
|
-
|
69
|
+
### Link your fork of LobeChat to the just created Zeabur service.
|
77
70
|
|
78
|
-
|
71
|
+
When adding service, choose github. This may triger a oAuth depend on varies factors like how you login to Zeabur and if you have already authorized Zeabur to access all your repos
|
79
72
|
|
80
|
-
|
73
|
+
### Bind a custom domain (optional)
|
81
74
|
|
82
|
-
|
75
|
+
You can create a subdomain provided by Zeabur, or choose to bind a custom domain. Currently, the domains provided by Zeabur have not been contaminated, and most regions can connect directly.
|
83
76
|
|
77
|
+
### Zeabur shall start auto build and you should be able to access it by the domain of your choice after a while.
|
84
78
|
</Steps>
|
79
|
+
|
80
|
+
[deploy-button-image]: https://zeabur.com/button.svg
|
81
|
+
[deploy-link]: https://zeabur.com/templates/VZGGTI
|
@@ -18,23 +18,19 @@ tags:
|
|
18
18
|
<Steps>
|
19
19
|
### 准备好你的 OpenAI API Key
|
20
20
|
|
21
|
-
前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
|
21
|
+
前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
|
22
22
|
|
23
|
-
### 点击下方按钮进行部署
|
23
|
+
### 点击下方按钮进行部署
|
24
24
|
|
25
|
-
[![][deploy-button-image]][deploy-link]
|
25
|
+
[![][deploy-button-image]][deploy-link]
|
26
26
|
|
27
|
-
### 部署完毕后,即可开始使用
|
27
|
+
### 部署完毕后,即可开始使用
|
28
28
|
|
29
|
-
### 绑定自定义域名(可选)
|
30
|
-
|
31
|
-
你可以使用 Zeabur 提供的子域名,也可以选择绑定自定义域名。目前 Zeabur 提供的域名还未被污染,大多数地区都可以直连。
|
29
|
+
### 绑定自定义域名(可选)
|
32
30
|
|
31
|
+
你可以使用 Zeabur 提供的子域名,也可以选择绑定自定义域名。目前 Zeabur 提供的域名还未被污染,大多数地区都可以直连。
|
33
32
|
</Steps>
|
34
33
|
|
35
|
-
[deploy-button-image]: https://zeabur.com/button.svg
|
36
|
-
[deploy-link]: https://zeabur.com/templates/VZGGTI
|
37
|
-
|
38
34
|
# 使用 Zeabur 将 LobeChat 部署为无服务器函数
|
39
35
|
|
40
36
|
> **注意:** 仍然存在关于 [Zeabur 上 next.js 的中间件和重写问题](https://github.com/lobehub/lobe-chat/pull/2775?notification_referrer_id=NT_kwDOAdi2DrQxMDkyODQ4MDc2NTozMDk3OTU5OA#issuecomment-2146713899),请自担风险!
|
@@ -44,40 +40,41 @@ tags:
|
|
44
40
|
## Zeabur 部署流程
|
45
41
|
|
46
42
|
<Steps>
|
43
|
+
### Fork LobeChat
|
47
44
|
|
48
|
-
###
|
49
|
-
|
50
|
-
### 添加 Zeabur 打包配置文件
|
45
|
+
### 添加 Zeabur 打包配置文件
|
51
46
|
|
52
|
-
在您的分支的根目录下添加一个 `zbpack.json` 配置文件,内容如下:
|
47
|
+
在您的分支的根目录下添加一个 `zbpack.json` 配置文件,内容如下:
|
53
48
|
|
54
|
-
```json
|
55
|
-
{
|
56
|
-
|
57
|
-
|
58
|
-
}
|
59
|
-
```
|
49
|
+
```json
|
50
|
+
{
|
51
|
+
"ignore_dockerfile": true,
|
52
|
+
"serverless": true
|
53
|
+
}
|
54
|
+
```
|
60
55
|
|
61
|
-
### 准备您的 OpenAI API 密钥
|
56
|
+
### 准备您的 OpenAI API 密钥
|
62
57
|
|
63
|
-
前往 [OpenAI API 密钥](https://platform.openai.com/account/api-keys) 获取您的 OpenAI API 密钥。
|
58
|
+
前往 [OpenAI API 密钥](https://platform.openai.com/account/api-keys) 获取您的 OpenAI API 密钥。
|
64
59
|
|
65
|
-
### 登录到您的 [Zeabur 仪表板](https://dash.zeabur.com)
|
60
|
+
### 登录到您的 [Zeabur 仪表板](https://dash.zeabur.com)
|
66
61
|
|
67
|
-
如果您尚未拥有一个账号,您需要注册一个。
|
62
|
+
如果您尚未拥有一个账号,您需要注册一个。
|
68
63
|
|
69
|
-
### 创建项目与服务。
|
64
|
+
### 创建项目与服务。
|
70
65
|
|
71
|
-
创建一个项目,并再这个项目下新建一个服务。
|
66
|
+
创建一个项目,并再这个项目下新建一个服务。
|
72
67
|
|
73
|
-
### 将您的 LobeChat 分支链接到刚创建的 Zeabur 服务。
|
68
|
+
### 将您的 LobeChat 分支链接到刚创建的 Zeabur 服务。
|
74
69
|
|
75
|
-
在添加服务时,选择 github。这可能会触发一个 oAuth,取决于诸如您如何登录到 Zeabur以及您是否已经授权 Zeabur 访问所有您的存储库等各种因素。
|
70
|
+
在添加服务时,选择 github。这可能会触发一个 oAuth,取决于诸如您如何登录到 Zeabur 以及您是否已经授权 Zeabur 访问所有您的存储库等各种因素。
|
76
71
|
|
77
|
-
### 绑定自定义域名(可选)
|
72
|
+
### 绑定自定义域名(可选)
|
78
73
|
|
79
|
-
您可以创建 Zeabur 提供的子域名,或选择绑定自定义域名。目前,Zeabur 提供的域名尚未受到污染,大多数地区可以直接连接。
|
80
|
-
|
81
|
-
### Zeabur 将开始自动构建,您应该可以在一段时间后通过您选择的域名访问它。
|
74
|
+
您可以创建 Zeabur 提供的子域名,或选择绑定自定义域名。目前,Zeabur 提供的域名尚未受到污染,大多数地区可以直接连接。
|
82
75
|
|
76
|
+
### Zeabur 将开始自动构建,您应该可以在一段时间后通过您选择的域名访问它。
|
83
77
|
</Steps>
|
78
|
+
|
79
|
+
[deploy-button-image]: https://zeabur.com/button.svg
|
80
|
+
[deploy-link]: https://zeabur.com/templates/VZGGTI
|
@@ -15,10 +15,9 @@ tags:
|
|
15
15
|
<div style={{display:"flex", gap: 4}}>
|
16
16
|
[![][docker-release-shield]][docker-release-link]
|
17
17
|
|
18
|
-
[![][docker-size-shield]][docker-size-link]
|
19
|
-
|
20
|
-
[![][docker-pulls-shield]][docker-pulls-link]
|
18
|
+
[![][docker-size-shield]][docker-size-link]
|
21
19
|
|
20
|
+
[![][docker-pulls-shield]][docker-pulls-link]
|
22
21
|
</div>
|
23
22
|
|
24
23
|
<Callout type="info">
|
@@ -32,8 +31,7 @@ tags:
|
|
32
31
|
<Callout type="warning">
|
33
32
|
Due to the inability to expose `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` using Docker environment variables, you cannot use Clerk as a login authentication service when deploying LobeChat with Docker / Docker Compose.
|
34
33
|
|
35
|
-
If you need Clerk as a login authentication service, consider deploying with Vercel or building your own image.
|
36
|
-
|
34
|
+
If you need Clerk as a login authentication service, consider deploying with Vercel or building your own image.
|
37
35
|
</Callout>
|
38
36
|
|
39
37
|
In general, to fully run the LobeChat database version, you need at least the following four services:
|
@@ -62,47 +60,46 @@ To facilitate a quick start, this section uses the `docker-compose/local` direct
|
|
62
60
|
<Steps>
|
63
61
|
### One-click Startup Script
|
64
62
|
|
65
|
-
Create a new directory named `lobe-chat-db` to store your configuration files and subsequent database files.
|
63
|
+
Create a new directory named `lobe-chat-db` to store your configuration files and subsequent database files.
|
66
64
|
|
67
|
-
```sh
|
68
|
-
mkdir lobe-chat-db
|
69
|
-
cd lobe-chat-db
|
70
|
-
```
|
65
|
+
```sh
|
66
|
+
mkdir lobe-chat-db
|
67
|
+
cd lobe-chat-db
|
68
|
+
```
|
71
69
|
|
72
|
-
We provide a one-click startup script `setup.sh`, which can automatically use the default configuration and start the service:
|
70
|
+
We provide a one-click startup script `setup.sh`, which can automatically use the default configuration and start the service:
|
73
71
|
|
74
|
-
```sh
|
75
|
-
bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f
|
76
|
-
```
|
72
|
+
```sh
|
73
|
+
bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f
|
74
|
+
```
|
77
75
|
|
78
|
-
### Start Docker
|
79
|
-
|
80
|
-
```sh
|
81
|
-
docker compose up -d
|
82
|
-
```
|
76
|
+
### Start Docker
|
83
77
|
|
84
|
-
|
78
|
+
```sh
|
79
|
+
docker compose up -d
|
80
|
+
```
|
85
81
|
|
86
|
-
|
82
|
+
The default login account is the default account of Casdoor, with the username `admin`. You can find the password in the `init_data.json` file that is downloaded during setup. Note that the secret might fail to generate, please check the shell output.
|
87
83
|
|
88
|
-
|
89
|
-
docker logs -f lobe-chat
|
90
|
-
```
|
84
|
+
### Check Logs
|
91
85
|
|
92
|
-
|
86
|
+
```sh
|
87
|
+
docker logs -f lobe-chat
|
88
|
+
```
|
93
89
|
|
94
|
-
|
95
|
-
[Database] Start to migration...
|
96
|
-
✅ database migration pass.
|
97
|
-
-------------------------------------
|
98
|
-
▲ Next.js 14.x.x
|
99
|
-
- Local: http://localhost:3210
|
100
|
-
- Network: http://0.0.0.0:3210
|
90
|
+
If you see the following logs in the container, it means the startup was successful:
|
101
91
|
|
102
|
-
|
103
|
-
|
104
|
-
|
92
|
+
```log
|
93
|
+
[Database] Start to migration...
|
94
|
+
✅ database migration pass.
|
95
|
+
-------------------------------------
|
96
|
+
▲ Next.js 14.x.x
|
97
|
+
- Local: http://localhost:3210
|
98
|
+
- Network: http://0.0.0.0:3210
|
105
99
|
|
100
|
+
✓ Starting...
|
101
|
+
✓ Ready in 95ms
|
102
|
+
```
|
106
103
|
</Steps>
|
107
104
|
|
108
105
|
At this point, you have successfully deployed the LobeChat database version, and you can access your LobeChat service at `http://localhost:3210`.
|
@@ -220,10 +217,9 @@ And the service ports that do not require reverse proxy:
|
|
220
217
|
<Callout type="warning">
|
221
218
|
Please note that CORS cross-domain is configured internally in MinIO / Logto services. Do not configure CORS additionally in your reverse proxy, as this will cause errors.
|
222
219
|
|
223
|
-
For MinIO not on port 443, the Host must be `$http_host` (with port number), otherwise a 403 error will occur: `proxy_set_header Host $http_host`.
|
224
|
-
|
225
|
-
If you need to configure an SSL certificate, please configure it uniformly in the outer Nginx reverse proxy and not in MinIO.
|
220
|
+
For MinIO not on port 443, the Host must be `$http_host` (with port number), otherwise a 403 error will occur: `proxy_set_header Host $http_host`.
|
226
221
|
|
222
|
+
If you need to configure an SSL certificate, please configure it uniformly in the outer Nginx reverse proxy and not in MinIO.
|
227
223
|
</Callout>
|
228
224
|
|
229
225
|
### Configuration Files
|
@@ -269,8 +265,7 @@ This article uses Logto as an example to explain the configuration process. If y
|
|
269
265
|
<Callout type="warning">
|
270
266
|
Please remember to configure the CORS cross-domain settings for the corresponding login authentication service provider to ensure LobeChat can access the authentication service properly.
|
271
267
|
|
272
|
-
In this article, you need to allow cross-domain requests from `https://lobe.example.com`.
|
273
|
-
|
268
|
+
In this article, you need to allow cross-domain requests from `https://lobe.example.com`.
|
274
269
|
</Callout>
|
275
270
|
|
276
271
|
You first need to visit the WebUI for configuration:
|
@@ -286,26 +281,17 @@ You first need to visit the WebUI for configuration:
|
|
286
281
|
|
287
282
|
4. Set `CORS allowed origins` to `https://lobe.example.com`.
|
288
283
|
|
289
|
-
<Image
|
290
|
-
alt="Configuring Logto"
|
291
|
-
src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523"
|
292
|
-
/>
|
284
|
+
<Image alt="Configuring Logto" src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523" />
|
293
285
|
|
294
286
|
5. Obtain `App ID` and `App secrets`, and fill them into your `.env` file under `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET`.
|
295
287
|
|
296
288
|
6. Set `AUTH_LOGTO_ISSUER` in your `.env` file to `https://lobe-auth-api.example.com/oidc`.
|
297
289
|
|
298
|
-
<Image
|
299
|
-
alt="Configuring Logto Environment Variables"
|
300
|
-
src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837"
|
301
|
-
/>
|
290
|
+
<Image alt="Configuring Logto Environment Variables" src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837" />
|
302
291
|
|
303
292
|
7. Optionally, in the left panel under `Sign-in experience`, you can disable `Enable user registration` in `Sign-up and sign-in - Advanced Options` to prevent users from registering on their own. If you disable user registration, you will need to manually add users in the left panel under `User Management`.
|
304
293
|
|
305
|
-
<Image
|
306
|
-
alt="Disable User Registration"
|
307
|
-
src="https://github.com/user-attachments/assets/6b2e6f7b-fec5-41c6-864a-a1add40f74a0"
|
308
|
-
/>
|
294
|
+
<Image alt="Disable User Registration" src="https://github.com/user-attachments/assets/6b2e6f7b-fec5-41c6-864a-a1add40f74a0" />
|
309
295
|
|
310
296
|
8. Restart the LobeChat service:
|
311
297
|
|
@@ -325,10 +311,9 @@ This article uses MinIO as an example to explain the configuration process. If y
|
|
325
311
|
<Callout type="warning">
|
326
312
|
Please remember to configure the CORS cross-domain settings for the corresponding S3 service provider to ensure LobeChat can access the S3 service properly.
|
327
313
|
|
328
|
-
In this article, you need to allow cross-domain requests from `https://lobe.example.com`. This can be configured in MinIO WebUI under `Configuration - API - Cors Allow Origin`, or in the Docker Compose under `minio - environment - MINIO_API_CORS_ALLOW_ORIGIN`.
|
329
|
-
|
330
|
-
If you use the second method (which is also the default method) for configuration, you will not be able to configure it in MinIO WebUI anymore.
|
314
|
+
In this article, you need to allow cross-domain requests from `https://lobe.example.com`. This can be configured in MinIO WebUI under `Configuration - API - Cors Allow Origin`, or in the Docker Compose under `minio - environment - MINIO_API_CORS_ALLOW_ORIGIN`.
|
331
315
|
|
316
|
+
If you use the second method (which is also the default method) for configuration, you will not be able to configure it in MinIO WebUI anymore.
|
332
317
|
</Callout>
|
333
318
|
|
334
319
|
You first need to visit the WebUI for configuration:
|
@@ -340,29 +325,17 @@ You first need to visit the WebUI for configuration:
|
|
340
325
|
|
341
326
|
2. In the left panel under Administer / Buckets, click `Create Bucket`, enter `lobe` (which corresponds to your `S3_BUCKET` environment variable), and then click `Create`.
|
342
327
|
|
343
|
-
<Image
|
344
|
-
alt="Create MinIO Bucket"
|
345
|
-
src="https://github.com/user-attachments/assets/79f44a13-00d3-4302-a6bc-5f4c6cdbffab"
|
346
|
-
/>
|
328
|
+
<Image alt="Create MinIO Bucket" src="https://github.com/user-attachments/assets/79f44a13-00d3-4302-a6bc-5f4c6cdbffab" />
|
347
329
|
|
348
330
|
3. Select your bucket, click Summary - Access Policy, edit, choose `Custom`, input the content from `minio-bucket-config.json` (see appendix), and save (assuming your bucket name is `lobe`):
|
349
331
|
|
350
|
-
<Image
|
351
|
-
alt="Select MinIO Bucket Policy"
|
352
|
-
src="https://github.com/user-attachments/assets/57032a82-7604-45d3-ba12-884af6fbcb7c"
|
353
|
-
/>
|
332
|
+
<Image alt="Select MinIO Bucket Policy" src="https://github.com/user-attachments/assets/57032a82-7604-45d3-ba12-884af6fbcb7c" />
|
354
333
|
|
355
|
-
<Image
|
356
|
-
alt="Configure MinIO Bucket Policy"
|
357
|
-
src="https://github.com/user-attachments/assets/d8109f4e-71fc-4ba8-8402-ede92669d5e0"
|
358
|
-
/>
|
334
|
+
<Image alt="Configure MinIO Bucket Policy" src="https://github.com/user-attachments/assets/d8109f4e-71fc-4ba8-8402-ede92669d5e0" />
|
359
335
|
|
360
336
|
4. In the left panel under User / Access Keys, click `Create New Access Key`, without any extra modifications, and fill the generated `Access Key` and `Secret Key` into your `.env` file under `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`.
|
361
337
|
|
362
|
-
<Image
|
363
|
-
alt="Create MinIO Access Key"
|
364
|
-
src="https://github.com/user-attachments/assets/72f02ce5-9991-425b-9864-9113ee1ed6bf"
|
365
|
-
/>
|
338
|
+
<Image alt="Create MinIO Access Key" src="https://github.com/user-attachments/assets/72f02ce5-9991-425b-9864-9113ee1ed6bf" />
|
366
339
|
|
367
340
|
5. Restart the LobeChat service:
|
368
341
|
|
@@ -13,10 +13,9 @@ tags:
|
|
13
13
|
<div style={{display:"flex", gap: 4}}>
|
14
14
|
[![][docker-release-shield]][docker-release-link]
|
15
15
|
|
16
|
-
[![][docker-size-shield]][docker-size-link]
|
17
|
-
|
18
|
-
[![][docker-pulls-shield]][docker-pulls-link]
|
16
|
+
[![][docker-size-shield]][docker-size-link]
|
19
17
|
|
18
|
+
[![][docker-pulls-shield]][docker-pulls-link]
|
20
19
|
</div>
|
21
20
|
|
22
21
|
<Callout type="info">
|
@@ -29,8 +28,7 @@ tags:
|
|
29
28
|
由于无法使用 Docker 环境变量暴露 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`,使用 Docker / Docker Compose
|
30
29
|
部署 LobeChat 时,你不能使用 Clerk 作为登录鉴权服务。
|
31
30
|
|
32
|
-
如果你确实需要 Clerk 作为登录鉴权服务,你可以考虑使用 Vercel 部署或者自行构建镜像。
|
33
|
-
|
31
|
+
如果你确实需要 Clerk 作为登录鉴权服务,你可以考虑使用 Vercel 部署或者自行构建镜像。
|
34
32
|
</Callout>
|
35
33
|
|
36
34
|
一般来讲,想要完整的运行 LobeChat 数据库版本,你需要至少拥有如下四个服务
|
@@ -58,47 +56,46 @@ tags:
|
|
58
56
|
<Steps>
|
59
57
|
### 一键启动脚本
|
60
58
|
|
61
|
-
新建一个 `lobe-chat-db` 目录,用于存放你的配置文件和后续的数据库文件。
|
59
|
+
新建一个 `lobe-chat-db` 目录,用于存放你的配置文件和后续的数据库文件。
|
62
60
|
|
63
|
-
```sh
|
64
|
-
mkdir lobe-chat-db
|
65
|
-
cd lobe-chat-db
|
66
|
-
```
|
61
|
+
```sh
|
62
|
+
mkdir lobe-chat-db
|
63
|
+
cd lobe-chat-db
|
64
|
+
```
|
67
65
|
|
68
|
-
我们提供了一个一键启动脚本 `setup.sh`,可以自动使用默认配置并启动服务:
|
66
|
+
我们提供了一个一键启动脚本 `setup.sh`,可以自动使用默认配置并启动服务:
|
69
67
|
|
70
|
-
```sh
|
71
|
-
bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f -l zh_CN
|
72
|
-
```
|
68
|
+
```sh
|
69
|
+
bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f -l zh_CN
|
70
|
+
```
|
73
71
|
|
74
|
-
### 启动 Docker
|
75
|
-
|
76
|
-
```sh
|
77
|
-
docker compose up -d
|
78
|
-
```
|
72
|
+
### 启动 Docker
|
79
73
|
|
80
|
-
|
74
|
+
```sh
|
75
|
+
docker compose up -d
|
76
|
+
```
|
81
77
|
|
82
|
-
|
78
|
+
默认登录账号即 Casdoor 的默认账号,账号名 `admin`,密码 `123`
|
83
79
|
|
84
|
-
|
85
|
-
docker logs -f lobe-chat
|
86
|
-
```
|
80
|
+
### 检查日志
|
87
81
|
|
88
|
-
|
82
|
+
```sh
|
83
|
+
docker logs -f lobe-chat
|
84
|
+
```
|
89
85
|
|
90
|
-
|
91
|
-
[Database] Start to migration...
|
92
|
-
✅ database migration pass.
|
93
|
-
-------------------------------------
|
94
|
-
▲ Next.js 14.x.x
|
95
|
-
- Local: http://localhost:3210
|
96
|
-
- Network: http://0.0.0.0:3210
|
86
|
+
如果你在容器中看到了以下日志,则说明已经启动成功:
|
97
87
|
|
98
|
-
|
99
|
-
|
100
|
-
|
88
|
+
```log
|
89
|
+
[Database] Start to migration...
|
90
|
+
✅ database migration pass.
|
91
|
+
-------------------------------------
|
92
|
+
▲ Next.js 14.x.x
|
93
|
+
- Local: http://localhost:3210
|
94
|
+
- Network: http://0.0.0.0:3210
|
101
95
|
|
96
|
+
✓ Starting...
|
97
|
+
✓ Ready in 95ms
|
98
|
+
```
|
102
99
|
</Steps>
|
103
100
|
|
104
101
|
至此,你已经成功部署了 LobeChat 数据库版本,你可以通过 `http://localhost:3210` 访问你的 LobeChat 服务。
|
@@ -215,10 +212,9 @@ docker compose up -d
|
|
215
212
|
<Callout type="warning">
|
216
213
|
请务必注意,CORS 跨域是在 MinIO / Logto 服务端内部配置的,请勿在你的反向代理中额外配置 CORS,这会导致错误。
|
217
214
|
|
218
|
-
对于 minio 非 443 端口时,Host 必须是 `$http_host`(带端口号),否则会 403 错误:`proxy_set_header Host $http_host`。
|
219
|
-
|
220
|
-
如果你需要配置 SSL 证书,请统一在外层的 Nginx 反向代理中配置,而不是在 MinIO 中配置。
|
215
|
+
对于 minio 非 443 端口时,Host 必须是 `$http_host`(带端口号),否则会 403 错误:`proxy_set_header Host $http_host`。
|
221
216
|
|
217
|
+
如果你需要配置 SSL 证书,请统一在外层的 Nginx 反向代理中配置,而不是在 MinIO 中配置。
|
222
218
|
</Callout>
|
223
219
|
|
224
220
|
### 配置文件
|
@@ -264,8 +260,7 @@ docker compose up -d # 重新启动
|
|
264
260
|
<Callout type="warning">
|
265
261
|
请记得注意配置对应登录鉴权服务提供商的 CORS 跨域配置,以确保 LobeChat 能够正常访问登录鉴权服务。
|
266
262
|
|
267
|
-
在本文中,你需要允许 `https://lobe.example.com` 的跨域请求。
|
268
|
-
|
263
|
+
在本文中,你需要允许 `https://lobe.example.com` 的跨域请求。
|
269
264
|
</Callout>
|
270
265
|
|
271
266
|
你需要首先访问 WebUI 来进行配置:
|
@@ -281,26 +276,17 @@ docker compose up -d # 重新启动
|
|
281
276
|
|
282
277
|
4. 配置 `CORS allowed origins` 为 `https://lobe.example.com`
|
283
278
|
|
284
|
-
<Image
|
285
|
-
alt="配置 Logto"
|
286
|
-
src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523"
|
287
|
-
/>
|
279
|
+
<Image alt="配置 Logto" src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523" />
|
288
280
|
|
289
281
|
5. 获取 `App ID` 和 `App secrets`,填入你的 `.env` 文件中的 `AUTH_LOGTO_ID` 和 `AUTH_LOGTO_SECRET` 中
|
290
282
|
|
291
283
|
6. 配置你的 `.env` 文件中 `AUTH_LOGTO_ISSUER` 为 `https://lobe-auth-api.example.com/oidc`
|
292
284
|
|
293
|
-
<Image
|
294
|
-
alt="配置 Logto 环境变量"
|
295
|
-
src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837"
|
296
|
-
/>
|
285
|
+
<Image alt="配置 Logto 环境变量" src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837" />
|
297
286
|
|
298
287
|
7. 可选,在左侧 `Sign-in experience` 面板的 `Sign-up and sign-in - Advanced Options` 中关闭 `Enable user registration`,禁止用户自行注册。如果你禁止了用户自行注册,那么你只能在左侧 `User Management` 里手动添加用户。
|
299
288
|
|
300
|
-
<Image
|
301
|
-
alt="关闭用户注册"
|
302
|
-
src="https://github.com/user-attachments/assets/6b2e6f7b-fec5-41c6-864a-a1add40f74a0"
|
303
|
-
/>
|
289
|
+
<Image alt="关闭用户注册" src="https://github.com/user-attachments/assets/6b2e6f7b-fec5-41c6-864a-a1add40f74a0" />
|
304
290
|
|
305
291
|
8. 重启 LobeChat 服务:
|
306
292
|
|
@@ -319,10 +305,9 @@ docker compose up -d # 重新启动
|
|
319
305
|
<Callout type="warning">
|
320
306
|
请记得注意配置对应 S3 服务商的 CORS 跨域配置,以确保 LobeChat 能够正常访问 S3 服务。
|
321
307
|
|
322
|
-
在本文中,你需要允许 `https://lobe.example.com` 的跨域请求。这既可以在 MinIO WebUI 的 `Configuration - API - Cors Allow Origin` 中配置,也可以在 Docker Compose 中的 `minio - environment - MINIO_API_CORS_ALLOW_ORIGIN` 中配置。
|
323
|
-
|
324
|
-
如果你使用第二种方法(这也是默认的方法)进行配置,你将无法再在 MinIO WebUI 中配置。
|
308
|
+
在本文中,你需要允许 `https://lobe.example.com` 的跨域请求。这既可以在 MinIO WebUI 的 `Configuration - API - Cors Allow Origin` 中配置,也可以在 Docker Compose 中的 `minio - environment - MINIO_API_CORS_ALLOW_ORIGIN` 中配置。
|
325
309
|
|
310
|
+
如果你使用第二种方法(这也是默认的方法)进行配置,你将无法再在 MinIO WebUI 中配置。
|
326
311
|
</Callout>
|
327
312
|
|
328
313
|
你需要首先访问 WebUI 来进行配置:
|
@@ -334,29 +319,17 @@ docker compose up -d # 重新启动
|
|
334
319
|
|
335
320
|
2. 在左侧面板 Administer / Buckets 中点击 `Create Bucket`,输入 `lobe`(对应你的 `S3_BUCKET` 环境变量),然后点击 `Create`
|
336
321
|
|
337
|
-
<Image
|
338
|
-
alt="创建 MinIO 桶"
|
339
|
-
src="https://github.com/user-attachments/assets/79f44a13-00d3-4302-a6bc-5f4c6cdbffab"
|
340
|
-
/>
|
322
|
+
<Image alt="创建 MinIO 桶" src="https://github.com/user-attachments/assets/79f44a13-00d3-4302-a6bc-5f4c6cdbffab" />
|
341
323
|
|
342
324
|
3. 选中你的桶,点击 Summary - Access Policy,编辑,选择 `Custom`,输入 `minio-bucket-config.json` 中的内容(见附录)并保存(同样默认你的桶名为 `lobe`):
|
343
325
|
|
344
|
-
<Image
|
345
|
-
alt="选中 MinIO 桶策略"
|
346
|
-
src="https://github.com/user-attachments/assets/57032a82-7604-45d3-ba12-884af6fbcb7c"
|
347
|
-
/>
|
326
|
+
<Image alt="选中 MinIO 桶策略" src="https://github.com/user-attachments/assets/57032a82-7604-45d3-ba12-884af6fbcb7c" />
|
348
327
|
|
349
|
-
<Image
|
350
|
-
alt="配置 MinIO 桶策略"
|
351
|
-
src="https://github.com/user-attachments/assets/d8109f4e-71fc-4ba8-8402-ede92669d5e0"
|
352
|
-
/>
|
328
|
+
<Image alt="配置 MinIO 桶策略" src="https://github.com/user-attachments/assets/d8109f4e-71fc-4ba8-8402-ede92669d5e0" />
|
353
329
|
|
354
330
|
4. 在左侧面板 User / Access Keys 处,点击 `Create New Access Key`,无需额外修改,将生成的 `Access Key` 和 `Secret Key` 填入你的 `.env` 文件中的 `S3_ACCESS_KEY_ID` 和 `S3_SECRET_ACCESS_KEY` 中
|
355
331
|
|
356
|
-
<Image
|
357
|
-
alt="创建 MinIO 访问密钥"
|
358
|
-
src="https://github.com/user-attachments/assets/72f02ce5-9991-425b-9864-9113ee1ed6bf"
|
359
|
-
/>
|
332
|
+
<Image alt="创建 MinIO 访问密钥" src="https://github.com/user-attachments/assets/72f02ce5-9991-425b-9864-9113ee1ed6bf" />
|
360
333
|
|
361
334
|
5. 重启 LobeChat 服务:
|
362
335
|
|