@lobehub/chat 0.147.0 → 0.147.2
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/CHANGELOG.md +50 -0
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/docs/self-hosting/advanced/analytics.mdx +1 -0
- package/docs/self-hosting/advanced/analytics.zh-CN.mdx +1 -0
- package/docs/self-hosting/advanced/authentication.mdx +7 -6
- package/docs/self-hosting/advanced/authentication.zh-CN.mdx +7 -6
- package/docs/self-hosting/advanced/sso-providers/auth0.mdx +58 -32
- package/docs/self-hosting/advanced/sso-providers/auth0.zh-CN.mdx +60 -32
- package/docs/self-hosting/advanced/sso-providers/authentik.mdx +33 -29
- package/docs/self-hosting/advanced/sso-providers/authentik.zh-CN.mdx +30 -27
- package/docs/self-hosting/advanced/sso-providers/github.mdx +49 -20
- package/docs/self-hosting/advanced/sso-providers/github.zh-CN.mdx +57 -31
- package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.mdx +53 -35
- package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.zh-CN.mdx +43 -31
- package/docs/self-hosting/advanced/sso-providers/zitadel.mdx +64 -34
- package/docs/self-hosting/advanced/sso-providers/zitadel.zh-CN.mdx +62 -36
- package/docs/self-hosting/advanced/upstream-sync.mdx +32 -23
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +32 -23
- package/docs/self-hosting/environment-variables/analytics.mdx +1 -0
- package/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +1 -0
- package/docs/self-hosting/environment-variables/auth.mdx +1 -0
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +1 -0
- package/docs/self-hosting/environment-variables/basic.mdx +1 -0
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +1 -0
- package/docs/self-hosting/environment-variables/model-provider.mdx +1 -0
- package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +1 -0
- package/docs/self-hosting/environment-variables.mdx +1 -0
- package/docs/self-hosting/environment-variables.zh-CN.mdx +1 -0
- package/docs/self-hosting/examples/azure-openai.mdx +12 -8
- package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +12 -8
- package/docs/self-hosting/examples/ollama.mdx +1 -0
- package/docs/self-hosting/examples/ollama.zh-CN.mdx +1 -0
- package/docs/self-hosting/faq/no-v1-suffix.mdx +1 -0
- package/docs/self-hosting/faq/no-v1-suffix.zh-CN.mdx +1 -0
- package/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdx +1 -0
- package/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx +1 -0
- package/docs/self-hosting/platform/docker-compose.mdx +80 -73
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +79 -73
- package/docs/self-hosting/platform/docker.mdx +85 -85
- package/docs/self-hosting/platform/docker.zh-CN.mdx +84 -85
- package/docs/self-hosting/platform/netlify.mdx +91 -42
- package/docs/self-hosting/platform/netlify.zh-CN.mdx +88 -38
- package/docs/self-hosting/platform/railway.mdx +8 -6
- package/docs/self-hosting/platform/railway.zh-CN.mdx +8 -6
- package/docs/self-hosting/platform/repocloud.mdx +8 -6
- package/docs/self-hosting/platform/repocloud.zh-CN.mdx +8 -6
- package/docs/self-hosting/platform/sealos.mdx +8 -6
- package/docs/self-hosting/platform/sealos.zh-CN.mdx +8 -6
- package/docs/self-hosting/platform/vercel.mdx +9 -7
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +9 -7
- package/docs/self-hosting/platform/zeabur.mdx +8 -6
- package/docs/self-hosting/platform/zeabur.zh-CN.mdx +8 -6
- package/docs/self-hosting/start.mdx +11 -1
- package/docs/self-hosting/start.zh-CN.mdx +2 -1
- package/docs/usage/agents/concepts.mdx +13 -2
- package/docs/usage/agents/concepts.zh-CN.mdx +13 -2
- package/docs/usage/agents/custom-agent.mdx +9 -2
- package/docs/usage/agents/custom-agent.zh-CN.mdx +8 -4
- package/docs/usage/agents/model.mdx +3 -3
- package/docs/usage/agents/model.zh-CN.mdx +6 -5
- package/docs/usage/agents/prompt.mdx +7 -5
- package/docs/usage/agents/prompt.zh-CN.mdx +7 -5
- package/docs/usage/agents/topics.mdx +9 -1
- package/docs/usage/agents/topics.zh-CN.mdx +9 -1
- package/docs/usage/features/agent-market.mdx +5 -5
- package/docs/usage/features/agent-market.zh-CN.mdx +1 -0
- package/docs/usage/features/local-llm.mdx +6 -1
- package/docs/usage/features/local-llm.zh-CN.mdx +6 -1
- package/docs/usage/features/mobile.mdx +5 -1
- package/docs/usage/features/mobile.zh-CN.mdx +6 -1
- package/docs/usage/features/more.mdx +1 -0
- package/docs/usage/features/more.zh-CN.mdx +1 -0
- package/docs/usage/features/multi-ai-providers.mdx +11 -2
- package/docs/usage/features/multi-ai-providers.zh-CN.mdx +12 -2
- package/docs/usage/features/plugin-system.mdx +8 -7
- package/docs/usage/features/plugin-system.zh-CN.mdx +9 -7
- package/docs/usage/features/pwa.mdx +10 -4
- package/docs/usage/features/pwa.zh-CN.mdx +11 -4
- package/docs/usage/features/text-to-image.zh-CN.mdx +1 -0
- package/docs/usage/features/theme.mdx +6 -1
- package/docs/usage/features/theme.zh-CN.mdx +7 -1
- package/docs/usage/features/tts.zh-CN.mdx +1 -0
- package/docs/usage/features/vision.zh-CN.mdx +1 -0
- package/docs/usage/plugins/basic-usage.mdx +31 -7
- package/docs/usage/plugins/basic-usage.zh-CN.mdx +31 -7
- package/docs/usage/plugins/custom-plugin.mdx +1 -0
- package/docs/usage/plugins/custom-plugin.zh-CN.mdx +1 -0
- package/docs/usage/plugins/development.mdx +79 -30
- package/docs/usage/plugins/development.zh-CN.mdx +80 -31
- package/docs/usage/plugins/store.mdx +11 -2
- package/docs/usage/plugins/store.zh-CN.mdx +11 -2
- package/docs/usage/providers/groq.mdx +32 -12
- package/docs/usage/providers/groq.zh-CN.mdx +30 -12
- package/docs/usage/providers/ollama/gemma.mdx +27 -11
- package/docs/usage/providers/ollama/gemma.zh-CN.mdx +28 -11
- package/docs/usage/providers/ollama/qwen.mdx +30 -16
- package/docs/usage/providers/ollama/qwen.zh-CN.mdx +25 -11
- package/docs/usage/providers/ollama.mdx +27 -14
- package/docs/usage/providers/ollama.zh-CN.mdx +27 -14
- package/package.json +1 -1
- package/src/app/settings/llm/Azure/index.tsx +1 -1
- package/src/app/settings/llm/components/ProviderConfig/index.tsx +1 -1
- package/src/app/settings/llm/components/ProviderModelList/CustomModelOption.tsx +1 -1
- package/src/app/settings/llm/components/ProviderModelList/ModelConfigModal.tsx +1 -1
- package/src/app/settings/llm/components/ProviderModelList/ModelFetcher.tsx +3 -3
- package/src/app/settings/llm/components/ProviderModelList/index.tsx +2 -2
- package/src/features/AgentSetting/AgentConfig/ModelSelect.tsx +1 -1
- package/src/features/Conversation/Error/APIKeyForm/ProviderApiKeyForm.tsx +2 -2
- package/src/features/ModelSwitchPanel/index.tsx +1 -1
- package/src/locales/resources.test.ts +49 -0
- package/src/locales/resources.ts +7 -20
- package/src/services/_auth.ts +5 -3
- package/src/services/_header.ts +3 -4
- package/src/services/chat.ts +1 -1
- package/src/services/ollama.ts +3 -2
- package/src/store/global/slices/settings/actions/llm.test.ts +1 -1
- package/src/store/global/slices/settings/actions/llm.ts +2 -2
- package/src/store/global/slices/settings/selectors/modelConfig.test.ts +35 -14
- package/src/store/global/slices/settings/selectors/modelConfig.ts +55 -118
|
@@ -11,120 +11,127 @@ tags:
|
|
|
11
11
|
- Automatic Updates
|
|
12
12
|
- Crontab Script
|
|
13
13
|
---
|
|
14
|
+
|
|
14
15
|
# Docker Compose Deployment Guide
|
|
15
16
|
|
|
16
17
|
<div style={{display:"flex", gap: 4}}>
|
|
17
18
|
[![][docker-release-shield]][docker-release-link]
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
[![][docker-size-shield]][docker-size-link]
|
|
21
|
+
|
|
22
|
+
[![][docker-pulls-shield]][docker-pulls-link]
|
|
20
23
|
|
|
21
|
-
[![][docker-pulls-shield]][docker-pulls-link]
|
|
22
24
|
</div>
|
|
23
25
|
|
|
24
26
|
We provide a [Docker image][docker-release-link] for deploying the LobeChat service on your private device.
|
|
25
27
|
|
|
26
28
|
<Steps>
|
|
27
|
-
|
|
29
|
+
|
|
30
|
+
### Install Docker Container Environment
|
|
28
31
|
|
|
29
|
-
|
|
32
|
+
(Skip this step if already installed)
|
|
30
33
|
|
|
31
|
-
|
|
32
|
-
<Tab>
|
|
33
|
-
```fish
|
|
34
|
-
$ apt install docker.io
|
|
35
|
-
```
|
|
34
|
+
<Tabs items={['Ubuntu', 'CentOS']}>
|
|
36
35
|
|
|
36
|
+
<Tab>
|
|
37
|
+
|
|
38
|
+
```fish
|
|
39
|
+
$ apt install docker.io
|
|
40
|
+
```
|
|
41
|
+
|
|
37
42
|
</Tab>
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
<Tab>
|
|
45
|
+
|
|
46
|
+
```fish
|
|
47
|
+
$ yum install docker
|
|
48
|
+
```
|
|
49
|
+
|
|
44
50
|
</Tab>
|
|
45
|
-
|
|
51
|
+
|
|
46
52
|
</Tabs>
|
|
47
53
|
|
|
48
|
-
|
|
54
|
+
### Run Docker Compose Deployment Command
|
|
49
55
|
|
|
50
|
-
|
|
56
|
+
When using `docker-compose`, the configuration file is as follows:
|
|
51
57
|
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
```yml
|
|
59
|
+
version: '3.8'
|
|
54
60
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
services:
|
|
62
|
+
lobe-chat:
|
|
63
|
+
image: lobehub/lobe-chat
|
|
64
|
+
container_name: lobe-chat
|
|
65
|
+
restart: always
|
|
66
|
+
ports:
|
|
67
|
+
- '3210:3210'
|
|
68
|
+
environment:
|
|
69
|
+
OPENAI_API_KEY: sk-xxxx
|
|
70
|
+
OPENAI_PROXY_URL: https://api-proxy.com/v1
|
|
71
|
+
ACCESS_CODE: lobe66
|
|
72
|
+
```
|
|
67
73
|
|
|
68
|
-
|
|
74
|
+
Run the following command to start the Lobe Chat service:
|
|
69
75
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
```bash
|
|
77
|
+
$ docker-compose up -d
|
|
78
|
+
```
|
|
73
79
|
|
|
74
|
-
|
|
80
|
+
### Crontab Automatic Update Script (Optional)
|
|
75
81
|
|
|
76
|
-
|
|
82
|
+
Similarly, you can use the following script to automatically update Lobe Chat. When using `Docker Compose`, no additional configuration of environment variables is required.
|
|
77
83
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
```bash
|
|
85
|
+
#!/bin/bash
|
|
86
|
+
# auto-update-lobe-chat.sh
|
|
81
87
|
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
# Set proxy (optional)
|
|
89
|
+
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
|
|
84
90
|
|
|
85
|
-
|
|
86
|
-
|
|
91
|
+
# Pull the latest image and store the output in a variable
|
|
92
|
+
output=$(docker pull lobehub/lobe-chat:latest 2>&1)
|
|
87
93
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
# Check if the pull command was executed successfully
|
|
95
|
+
if [ $? -ne 0 ]; then
|
|
96
|
+
exit 1
|
|
97
|
+
fi
|
|
92
98
|
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
# Check if the output contains a specific string
|
|
100
|
+
echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
|
|
95
101
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
# If the image is already up to date, do nothing
|
|
103
|
+
if [ $? -eq 0 ]; then
|
|
104
|
+
exit 0
|
|
105
|
+
fi
|
|
100
106
|
|
|
101
|
-
|
|
107
|
+
echo "Detected Lobe-Chat update"
|
|
102
108
|
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
# Remove the old container
|
|
110
|
+
echo "Removed: $(docker rm -f Lobe-Chat)"
|
|
105
111
|
|
|
106
|
-
|
|
107
|
-
|
|
112
|
+
# You may need to navigate to the directory where `docker-compose.yml` is located first
|
|
113
|
+
# cd /path/to/docker-compose-folder
|
|
108
114
|
|
|
109
|
-
|
|
110
|
-
|
|
115
|
+
# Run the new container
|
|
116
|
+
echo "Started: $(docker-compose up)"
|
|
111
117
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
118
|
+
# Print the update time and version
|
|
119
|
+
echo "Update time: $(date)"
|
|
120
|
+
echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
|
|
115
121
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
122
|
+
# Clean up unused images
|
|
123
|
+
docker images | grep 'lobehub/lobe-chat' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1
|
|
124
|
+
echo "Removed old images."
|
|
125
|
+
```
|
|
120
126
|
|
|
121
|
-
|
|
127
|
+
This script can also be used in Crontab, but ensure that your Crontab can find the correct Docker command. It is recommended to use absolute paths.
|
|
122
128
|
|
|
123
|
-
|
|
129
|
+
Configure Crontab to execute the script every 5 minutes:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
|
|
133
|
+
```
|
|
124
134
|
|
|
125
|
-
```bash
|
|
126
|
-
*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
|
|
127
|
-
```
|
|
128
135
|
</Steps>
|
|
129
136
|
|
|
130
137
|
[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat
|
|
@@ -8,14 +8,16 @@ tags:
|
|
|
8
8
|
- 自动更新脚本
|
|
9
9
|
- 部署指引
|
|
10
10
|
---
|
|
11
|
+
|
|
11
12
|
# Docker Compose 部署指引
|
|
12
13
|
|
|
13
14
|
<div style={{display:"flex", gap: 4}}>
|
|
14
15
|
[![][docker-release-shield]][docker-release-link]
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
[![][docker-size-shield]][docker-size-link]
|
|
18
|
+
|
|
19
|
+
[![][docker-pulls-shield]][docker-pulls-link]
|
|
17
20
|
|
|
18
|
-
[![][docker-pulls-shield]][docker-pulls-link]
|
|
19
21
|
</div>
|
|
20
22
|
|
|
21
23
|
我们提供了 [Docker 镜像][docker-release-link],供你在自己的私有设备上部署 LobeChat 服务。
|
|
@@ -23,105 +25,109 @@ tags:
|
|
|
23
25
|
<Steps>
|
|
24
26
|
### 安装 Docker 容器环境
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
(如果已安装,请跳过此步)
|
|
29
|
+
|
|
30
|
+
<Tabs items={['Ubuntu', 'CentOS']}>
|
|
31
|
+
|
|
32
|
+
<Tab>
|
|
33
|
+
|
|
34
|
+
```fish
|
|
35
|
+
$ apt install docker.io
|
|
36
|
+
```
|
|
27
37
|
|
|
28
|
-
<Tabs items={['Ubuntu', 'CentOS']}>
|
|
29
|
-
<Tab>
|
|
30
|
-
```fish
|
|
31
|
-
$ apt install docker.io
|
|
32
|
-
```
|
|
33
|
-
|
|
34
38
|
</Tab>
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
<Tab>
|
|
41
|
+
|
|
42
|
+
```fish
|
|
43
|
+
$ yum install docker
|
|
44
|
+
```
|
|
45
|
+
|
|
41
46
|
</Tab>
|
|
42
|
-
|
|
47
|
+
|
|
43
48
|
</Tabs>
|
|
44
49
|
|
|
45
|
-
|
|
50
|
+
### 运行 Docker Compose 部署指令
|
|
51
|
+
|
|
52
|
+
使用 `docker-compose` 时配置文件如下:
|
|
46
53
|
|
|
47
|
-
|
|
54
|
+
```yml
|
|
55
|
+
version: '3.8'
|
|
48
56
|
|
|
49
|
-
|
|
50
|
-
|
|
57
|
+
services:
|
|
58
|
+
lobe-chat:
|
|
59
|
+
image: lobehub/lobe-chat
|
|
60
|
+
container_name: lobe-chat
|
|
61
|
+
restart: always
|
|
62
|
+
ports:
|
|
63
|
+
- '3210:3210'
|
|
64
|
+
environment:
|
|
65
|
+
OPENAI_API_KEY: sk-xxxx
|
|
66
|
+
OPENAI_PROXY_URL: https://api-proxy.com/v1
|
|
67
|
+
ACCESS_CODE: lobe66
|
|
68
|
+
```
|
|
51
69
|
|
|
52
|
-
|
|
53
|
-
lobe-chat:
|
|
54
|
-
image: lobehub/lobe-chat
|
|
55
|
-
container_name: lobe-chat
|
|
56
|
-
restart: always
|
|
57
|
-
ports:
|
|
58
|
-
- '3210:3210'
|
|
59
|
-
environment:
|
|
60
|
-
OPENAI_API_KEY: sk-xxxx
|
|
61
|
-
OPENAI_PROXY_URL: https://api-proxy.com/v1
|
|
62
|
-
ACCESS_CODE: lobe66
|
|
63
|
-
```
|
|
70
|
+
运行以下命令启动 Lobe Chat 服务:
|
|
64
71
|
|
|
65
|
-
|
|
72
|
+
```bash
|
|
73
|
+
$ docker-compose up -d
|
|
74
|
+
```
|
|
66
75
|
|
|
67
|
-
|
|
68
|
-
$ docker-compose up -d
|
|
69
|
-
```
|
|
76
|
+
### Crontab 自动更新脚本(可选)
|
|
70
77
|
|
|
71
|
-
|
|
78
|
+
类似地,你可以使用以下脚本来自动更新 Lobe Chat,使用 `Docker Compose` 时,环境变量无需额外配置。
|
|
72
79
|
|
|
73
|
-
|
|
80
|
+
```bash
|
|
81
|
+
#!/bin/bash
|
|
82
|
+
# auto-update-lobe-chat.sh
|
|
74
83
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
# auto-update-lobe-chat.sh
|
|
84
|
+
# 设置代理(可选)
|
|
85
|
+
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890
|
|
78
86
|
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
# 拉取最新的镜像并将输出存储在变量中
|
|
88
|
+
output=$(docker pull lobehub/lobe-chat:latest 2>&1)
|
|
81
89
|
|
|
82
|
-
|
|
83
|
-
|
|
90
|
+
# 检查拉取命令是否成功执行
|
|
91
|
+
if [ $? -ne 0 ]; then
|
|
92
|
+
exit 1
|
|
93
|
+
fi
|
|
84
94
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
exit 1
|
|
88
|
-
fi
|
|
95
|
+
# 检查输出中是否包含特定的字符串
|
|
96
|
+
echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest"
|
|
89
97
|
|
|
90
|
-
|
|
91
|
-
|
|
98
|
+
# 如果镜像已经是最新的,则不执行任何操作
|
|
99
|
+
if [ $? -eq 0 ]; then
|
|
100
|
+
exit 0
|
|
101
|
+
fi
|
|
92
102
|
|
|
93
|
-
|
|
94
|
-
if [ $? -eq 0 ]; then
|
|
95
|
-
exit 0
|
|
96
|
-
fi
|
|
103
|
+
echo "Detected Lobe-Chat update"
|
|
97
104
|
|
|
98
|
-
|
|
105
|
+
# 删除旧的容器
|
|
106
|
+
echo "Removed: $(docker rm -f Lobe-Chat)"
|
|
99
107
|
|
|
100
|
-
|
|
101
|
-
|
|
108
|
+
# 也许需要先进入 `docker-compose.yml` 所在的目录
|
|
109
|
+
# cd /path/to/docker-compose-folder
|
|
102
110
|
|
|
103
|
-
|
|
104
|
-
|
|
111
|
+
# 运行新的容器
|
|
112
|
+
echo "Started: $(docker-compose up)"
|
|
105
113
|
|
|
106
|
-
|
|
107
|
-
|
|
114
|
+
# 打印更新的时间和版本
|
|
115
|
+
echo "Update time: $(date)"
|
|
116
|
+
echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')"
|
|
108
117
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
118
|
+
# 清理不再使用的镜像
|
|
119
|
+
docker images | grep 'lobehub/lobe-chat' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1
|
|
120
|
+
echo "Removed old images."
|
|
121
|
+
```
|
|
112
122
|
|
|
113
|
-
|
|
114
|
-
docker images | grep 'lobehub/lobe-chat' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1
|
|
115
|
-
echo "Removed old images."
|
|
116
|
-
```
|
|
123
|
+
此脚本亦可以在 Crontab 中使用,但请确认你的 Crontab 可以找到正确的 Docker 命令。建议使用绝对路径。
|
|
117
124
|
|
|
118
|
-
|
|
125
|
+
配置 Crontab,每 5 分钟执行一次脚本:
|
|
119
126
|
|
|
120
|
-
|
|
127
|
+
```bash
|
|
128
|
+
*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
|
|
129
|
+
```
|
|
121
130
|
|
|
122
|
-
```bash
|
|
123
|
-
*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1
|
|
124
|
-
```
|
|
125
131
|
</Steps>
|
|
126
132
|
|
|
127
133
|
[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat
|