@lobehub/chat 1.60.8 → 1.60.9

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.
@@ -23,6 +23,7 @@ body:
23
23
  multiple: true
24
24
  options:
25
25
  - 'client db (lobe-chat image)'
26
+ - 'client pgelite db (lobe-chat-pglite image)'
26
27
  - 'server db(lobe-chat-database image)'
27
28
  validations:
28
29
  required: true
@@ -31,7 +32,7 @@ body:
31
32
  label: '📌 Version'
32
33
  validations:
33
34
  required: true
34
-
35
+
35
36
  - type: dropdown
36
37
  attributes:
37
38
  label: '💻 Operating System'
@@ -23,6 +23,7 @@ body:
23
23
  multiple: true
24
24
  options:
25
25
  - '客户端模式(lobe-chat 镜像)'
26
+ - '客户端 Pglite 模式(lobe-chat-pglite 镜像)'
26
27
  - '服务端模式(lobe-chat-database 镜像)'
27
28
  validations:
28
29
  required: true
@@ -0,0 +1,161 @@
1
+ name: Publish Docker Pglite Image
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ release:
6
+ types: [published]
7
+ pull_request:
8
+ types: [synchronize, labeled, unlabeled]
9
+
10
+ concurrency:
11
+ group: ${{ github.ref }}-${{ github.workflow }}
12
+ cancel-in-progress: true
13
+
14
+ env:
15
+ REGISTRY_IMAGE: lobehub/lobe-chat-pglite
16
+ PR_TAG_PREFIX: pr-
17
+
18
+ jobs:
19
+ build:
20
+ # 添加 PR label 触发条件
21
+ if: |
22
+ (github.event_name == 'pull_request' &&
23
+ contains(github.event.pull_request.labels.*.name, 'Build Docker')) ||
24
+ github.event_name != 'pull_request'
25
+
26
+ strategy:
27
+ matrix:
28
+ include:
29
+ - platform: linux/amd64
30
+ os: ubuntu-latest
31
+ - platform: linux/arm64
32
+ os: ubuntu-24.04-arm
33
+ runs-on: ${{ matrix.os }}
34
+ name: Build ${{ matrix.platform }} Image
35
+ steps:
36
+ - name: Prepare
37
+ run: |
38
+ platform=${{ matrix.platform }}
39
+ echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
40
+
41
+ - name: Checkout base
42
+ uses: actions/checkout@v4
43
+ with:
44
+ fetch-depth: 0
45
+
46
+ - name: Set up Docker Buildx
47
+ uses: docker/setup-buildx-action@v3
48
+
49
+ # 为 PR 生成特殊的 tag
50
+ - name: Generate PR metadata
51
+ if: github.event_name == 'pull_request'
52
+ id: pr_meta
53
+ run: |
54
+ branch_name="${{ github.head_ref }}"
55
+ sanitized_branch=$(echo "${branch_name}" | sed -E 's/[^a-zA-Z0-9_.-]+/-/g')
56
+ echo "pr_tag=${sanitized_branch}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
57
+
58
+ - name: Docker meta
59
+ id: meta
60
+ uses: docker/metadata-action@v5
61
+ with:
62
+ images: ${{ env.REGISTRY_IMAGE }}
63
+ tags: |
64
+ # PR 构建使用特殊的 tag
65
+ type=raw,value=${{ env.PR_TAG_PREFIX }}${{ steps.pr_meta.outputs.pr_tag }},enable=${{ github.event_name == 'pull_request' }}
66
+ # release 构建使用版本号
67
+ type=semver,pattern={{version}},enable=${{ github.event_name != 'pull_request' }}
68
+ type=raw,value=latest,enable=${{ github.event_name != 'pull_request' }}
69
+
70
+ - name: Docker login
71
+ uses: docker/login-action@v3
72
+ with:
73
+ username: ${{ secrets.DOCKER_REGISTRY_USER }}
74
+ password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
75
+
76
+ - name: Get commit SHA
77
+ if: github.ref == 'refs/heads/main'
78
+ id: vars
79
+ run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
80
+
81
+ - name: Build and export
82
+ id: build
83
+ uses: docker/build-push-action@v5
84
+ with:
85
+ platforms: ${{ matrix.platform }}
86
+ context: .
87
+ file: ./Dockerfile.pglite
88
+ labels: ${{ steps.meta.outputs.labels }}
89
+ build-args: |
90
+ SHA=${{ steps.vars.outputs.sha_short }}
91
+ outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
92
+
93
+ - name: Export digest
94
+ run: |
95
+ rm -rf /tmp/digests
96
+ mkdir -p /tmp/digests
97
+ digest="${{ steps.build.outputs.digest }}"
98
+ touch "/tmp/digests/${digest#sha256:}"
99
+
100
+ - name: Upload artifact
101
+ uses: actions/upload-artifact@v4
102
+ with:
103
+ name: digest-${{ env.PLATFORM_PAIR }}
104
+ path: /tmp/digests/*
105
+ if-no-files-found: error
106
+ retention-days: 1
107
+
108
+ merge:
109
+ name: Merge
110
+ needs: build
111
+ runs-on: ubuntu-latest
112
+ steps:
113
+ - name: Checkout base
114
+ uses: actions/checkout@v4
115
+ with:
116
+ fetch-depth: 0
117
+
118
+ - name: Download digests
119
+ uses: actions/download-artifact@v4
120
+ with:
121
+ path: /tmp/digests
122
+ pattern: digest-*
123
+ merge-multiple: true
124
+
125
+ - name: Set up Docker Buildx
126
+ uses: docker/setup-buildx-action@v3
127
+
128
+ # 为 merge job 添加 PR metadata 生成
129
+ - name: Generate PR metadata
130
+ if: github.event_name == 'pull_request'
131
+ id: pr_meta
132
+ run: |
133
+ branch_name="${{ github.head_ref }}"
134
+ sanitized_branch=$(echo "${branch_name}" | sed -E 's/[^a-zA-Z0-9_.-]+/-/g')
135
+ echo "pr_tag=${sanitized_branch}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
136
+
137
+ - name: Docker meta
138
+ id: meta
139
+ uses: docker/metadata-action@v5
140
+ with:
141
+ images: ${{ env.REGISTRY_IMAGE }}
142
+ tags: |
143
+ type=raw,value=${{ env.PR_TAG_PREFIX }}${{ steps.pr_meta.outputs.pr_tag }},enable=${{ github.event_name == 'pull_request' }}
144
+ type=semver,pattern={{version}},enable=${{ github.event_name != 'pull_request' }}
145
+ type=raw,value=latest,enable=${{ github.event_name != 'pull_request' }}
146
+
147
+ - name: Docker login
148
+ uses: docker/login-action@v3
149
+ with:
150
+ username: ${{ secrets.DOCKER_REGISTRY_USER }}
151
+ password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
152
+
153
+ - name: Create manifest list and push
154
+ working-directory: /tmp/digests
155
+ run: |
156
+ docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
157
+ $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
158
+
159
+ - name: Inspect image
160
+ run: |
161
+ docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
package/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.60.9](https://github.com/lobehub/lobe-chat/compare/v1.60.8...v1.60.9)
6
+
7
+ <sup>Released on **2025-02-18**</sup>
8
+
9
+ <br/>
10
+
11
+ <details>
12
+ <summary><kbd>Improvements and Fixes</kbd></summary>
13
+
14
+ </details>
15
+
16
+ <div align="right">
17
+
18
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
19
+
20
+ </div>
21
+
5
22
  ### [Version 1.60.8](https://github.com/lobehub/lobe-chat/compare/v1.60.7...v1.60.8)
6
23
 
7
24
  <sup>Released on **2025-02-18**</sup>
@@ -0,0 +1,244 @@
1
+ ## Set global build ENV
2
+ ARG NODEJS_VERSION="22"
3
+
4
+ ## Base image for all building stages
5
+ FROM node:${NODEJS_VERSION}-slim AS base
6
+
7
+ ARG USE_CN_MIRROR
8
+
9
+ ENV DEBIAN_FRONTEND="noninteractive"
10
+
11
+ RUN \
12
+ # If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true
13
+ if [ "${USE_CN_MIRROR:-false}" = "true" ]; then \
14
+ sed -i "s/deb.debian.org/mirrors.ustc.edu.cn/g" "/etc/apt/sources.list.d/debian.sources"; \
15
+ fi \
16
+ # Add required package
17
+ && apt update \
18
+ && apt install ca-certificates proxychains-ng -qy \
19
+ # Prepare required package to distroless
20
+ && mkdir -p /distroless/bin /distroless/etc /distroless/etc/ssl/certs /distroless/lib \
21
+ # Copy proxychains to distroless
22
+ && cp /usr/lib/$(arch)-linux-gnu/libproxychains.so.4 /distroless/lib/libproxychains.so.4 \
23
+ && cp /usr/lib/$(arch)-linux-gnu/libdl.so.2 /distroless/lib/libdl.so.2 \
24
+ && cp /usr/bin/proxychains4 /distroless/bin/proxychains \
25
+ && cp /etc/proxychains4.conf /distroless/etc/proxychains4.conf \
26
+ # Copy node to distroless
27
+ && cp /usr/lib/$(arch)-linux-gnu/libstdc++.so.6 /distroless/lib/libstdc++.so.6 \
28
+ && cp /usr/lib/$(arch)-linux-gnu/libgcc_s.so.1 /distroless/lib/libgcc_s.so.1 \
29
+ && cp /usr/local/bin/node /distroless/bin/node \
30
+ # Copy CA certificates to distroless
31
+ && cp /etc/ssl/certs/ca-certificates.crt /distroless/etc/ssl/certs/ca-certificates.crt \
32
+ # Cleanup temp files
33
+ && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
34
+
35
+ ## Builder image, install all the dependencies and build the app
36
+ FROM base AS builder
37
+
38
+ ARG USE_CN_MIRROR
39
+ ARG NEXT_PUBLIC_BASE_PATH
40
+ ARG NEXT_PUBLIC_SENTRY_DSN
41
+ ARG NEXT_PUBLIC_ANALYTICS_POSTHOG
42
+ ARG NEXT_PUBLIC_POSTHOG_HOST
43
+ ARG NEXT_PUBLIC_POSTHOG_KEY
44
+ ARG NEXT_PUBLIC_ANALYTICS_UMAMI
45
+ ARG NEXT_PUBLIC_UMAMI_SCRIPT_URL
46
+ ARG NEXT_PUBLIC_UMAMI_WEBSITE_ID
47
+
48
+ ENV NEXT_PUBLIC_CLIENT_DB="pglite"
49
+ ENV NEXT_PUBLIC_BASE_PATH="${NEXT_PUBLIC_BASE_PATH}"
50
+
51
+ # Sentry
52
+ ENV NEXT_PUBLIC_SENTRY_DSN="${NEXT_PUBLIC_SENTRY_DSN}" \
53
+ SENTRY_ORG="" \
54
+ SENTRY_PROJECT=""
55
+
56
+ # Posthog
57
+ ENV NEXT_PUBLIC_ANALYTICS_POSTHOG="${NEXT_PUBLIC_ANALYTICS_POSTHOG}" \
58
+ NEXT_PUBLIC_POSTHOG_HOST="${NEXT_PUBLIC_POSTHOG_HOST}" \
59
+ NEXT_PUBLIC_POSTHOG_KEY="${NEXT_PUBLIC_POSTHOG_KEY}"
60
+
61
+ # Umami
62
+ ENV NEXT_PUBLIC_ANALYTICS_UMAMI="${NEXT_PUBLIC_ANALYTICS_UMAMI}" \
63
+ NEXT_PUBLIC_UMAMI_SCRIPT_URL="${NEXT_PUBLIC_UMAMI_SCRIPT_URL}" \
64
+ NEXT_PUBLIC_UMAMI_WEBSITE_ID="${NEXT_PUBLIC_UMAMI_WEBSITE_ID}"
65
+
66
+ # Node
67
+ ENV NODE_OPTIONS="--max-old-space-size=8192"
68
+
69
+ WORKDIR /app
70
+
71
+ COPY package.json ./
72
+ COPY .npmrc ./
73
+
74
+ RUN \
75
+ # If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true
76
+ if [ "${USE_CN_MIRROR:-false}" = "true" ]; then \
77
+ export SENTRYCLI_CDNURL="https://npmmirror.com/mirrors/sentry-cli"; \
78
+ npm config set registry "https://registry.npmmirror.com/"; \
79
+ echo 'canvas_binary_host_mirror=https://npmmirror.com/mirrors/canvas' >> .npmrc; \
80
+ fi \
81
+ # Set the registry for corepack
82
+ && export COREPACK_NPM_REGISTRY=$(npm config get registry | sed 's/\/$//') \
83
+ # Update corepack to latest (nodejs/corepack#612)
84
+ && npm i -g corepack@latest \
85
+ # Enable corepack
86
+ && corepack enable \
87
+ # Use pnpm for corepack
88
+ && corepack use $(sed -n 's/.*"packageManager": "\(.*\)".*/\1/p' package.json) \
89
+ # Install the dependencies
90
+ && pnpm i \
91
+ # Add sharp dependencies
92
+ && mkdir -p /deps \
93
+ && pnpm add sharp --prefix /deps
94
+
95
+ COPY . .
96
+
97
+ # run build standalone for docker version
98
+ RUN npm run build:docker
99
+
100
+ ## Application image, copy all the files for production
101
+ FROM busybox:latest AS app
102
+
103
+ COPY --from=base /distroless/ /
104
+
105
+ COPY --from=builder /app/public /app/public
106
+
107
+ # Automatically leverage output traces to reduce image size
108
+ # https://nextjs.org/docs/advanced-features/output-file-tracing
109
+ COPY --from=builder /app/.next/standalone /app/
110
+ COPY --from=builder /app/.next/static /app/.next/static
111
+ COPY --from=builder /deps/node_modules/.pnpm /app/node_modules/.pnpm
112
+
113
+ # Copy server launcher
114
+ COPY --from=builder /app/scripts/serverLauncher/startServer.js /app/startServer.js
115
+
116
+ RUN \
117
+ # Add nextjs:nodejs to run the app
118
+ addgroup -S -g 1001 nodejs \
119
+ && adduser -D -G nodejs -H -S -h /app -u 1001 nextjs \
120
+ # Set permission for nextjs:nodejs
121
+ && chown -R nextjs:nodejs /app /etc/proxychains4.conf
122
+
123
+ ## Production image, copy all the files and run next
124
+ FROM scratch
125
+
126
+ # Copy all the files from app, set the correct permission for prerender cache
127
+ COPY --from=app / /
128
+
129
+ ENV NODE_ENV="production" \
130
+ NODE_OPTIONS="--dns-result-order=ipv4first --use-openssl-ca" \
131
+ NODE_EXTRA_CA_CERTS="" \
132
+ NODE_TLS_REJECT_UNAUTHORIZED="" \
133
+ SSL_CERT_DIR="/etc/ssl/certs/ca-certificates.crt"
134
+
135
+ # Make the middleware rewrite through local as default
136
+ # refs: https://github.com/lobehub/lobe-chat/issues/5876
137
+ ENV MIDDLEWARE_REWRITE_THROUGH_LOCAL="1"
138
+
139
+ # set hostname to localhost
140
+ ENV HOSTNAME="0.0.0.0" \
141
+ PORT="3210"
142
+
143
+ # General Variables
144
+ ENV ACCESS_CODE="" \
145
+ API_KEY_SELECT_MODE="" \
146
+ DEFAULT_AGENT_CONFIG="" \
147
+ SYSTEM_AGENT="" \
148
+ FEATURE_FLAGS="" \
149
+ PROXY_URL=""
150
+
151
+ # Model Variables
152
+ ENV \
153
+ # AI21
154
+ AI21_API_KEY="" AI21_MODEL_LIST="" \
155
+ # Ai360
156
+ AI360_API_KEY="" AI360_MODEL_LIST="" \
157
+ # Anthropic
158
+ ANTHROPIC_API_KEY="" ANTHROPIC_MODEL_LIST="" ANTHROPIC_PROXY_URL="" \
159
+ # Amazon Bedrock
160
+ AWS_ACCESS_KEY_ID="" AWS_SECRET_ACCESS_KEY="" AWS_REGION="" AWS_BEDROCK_MODEL_LIST="" \
161
+ # Azure OpenAI
162
+ AZURE_API_KEY="" AZURE_API_VERSION="" AZURE_ENDPOINT="" AZURE_MODEL_LIST="" \
163
+ # Baichuan
164
+ BAICHUAN_API_KEY="" BAICHUAN_MODEL_LIST="" \
165
+ # Cloudflare
166
+ CLOUDFLARE_API_KEY="" CLOUDFLARE_BASE_URL_OR_ACCOUNT_ID="" CLOUDFLARE_MODEL_LIST="" \
167
+ # DeepSeek
168
+ DEEPSEEK_API_KEY="" DEEPSEEK_MODEL_LIST="" \
169
+ # Fireworks AI
170
+ FIREWORKSAI_API_KEY="" FIREWORKSAI_MODEL_LIST="" \
171
+ # Gitee AI
172
+ GITEE_AI_API_KEY="" GITEE_AI_MODEL_LIST="" \
173
+ # GitHub
174
+ GITHUB_TOKEN="" GITHUB_MODEL_LIST="" \
175
+ # Google
176
+ GOOGLE_API_KEY="" GOOGLE_MODEL_LIST="" GOOGLE_PROXY_URL="" \
177
+ # Groq
178
+ GROQ_API_KEY="" GROQ_MODEL_LIST="" GROQ_PROXY_URL="" \
179
+ # Higress
180
+ HIGRESS_API_KEY="" HIGRESS_MODEL_LIST="" HIGRESS_PROXY_URL="" \
181
+ # HuggingFace
182
+ HUGGINGFACE_API_KEY="" HUGGINGFACE_MODEL_LIST="" HUGGINGFACE_PROXY_URL="" \
183
+ # Hunyuan
184
+ HUNYUAN_API_KEY="" HUNYUAN_MODEL_LIST="" \
185
+ # InternLM
186
+ INTERNLM_API_KEY="" INTERNLM_MODEL_LIST="" \
187
+ # Jina
188
+ JINA_API_KEY="" JINA_MODEL_LIST="" JINA_PROXY_URL="" \
189
+ # Minimax
190
+ MINIMAX_API_KEY="" MINIMAX_MODEL_LIST="" \
191
+ # Mistral
192
+ MISTRAL_API_KEY="" MISTRAL_MODEL_LIST="" \
193
+ # Moonshot
194
+ MOONSHOT_API_KEY="" MOONSHOT_MODEL_LIST="" MOONSHOT_PROXY_URL="" \
195
+ # Novita
196
+ NOVITA_API_KEY="" NOVITA_MODEL_LIST="" \
197
+ # Nvidia NIM
198
+ NVIDIA_API_KEY="" NVIDIA_MODEL_LIST="" NVIDIA_PROXY_URL="" \
199
+ # Ollama
200
+ ENABLED_OLLAMA="" OLLAMA_MODEL_LIST="" OLLAMA_PROXY_URL="" \
201
+ # OpenAI
202
+ OPENAI_API_KEY="" OPENAI_MODEL_LIST="" OPENAI_PROXY_URL="" \
203
+ # OpenRouter
204
+ OPENROUTER_API_KEY="" OPENROUTER_MODEL_LIST="" \
205
+ # Perplexity
206
+ PERPLEXITY_API_KEY="" PERPLEXITY_MODEL_LIST="" PERPLEXITY_PROXY_URL="" \
207
+ # Qwen
208
+ QWEN_API_KEY="" QWEN_MODEL_LIST="" QWEN_PROXY_URL="" \
209
+ # SambaNova
210
+ SAMBANOVA_API_KEY="" SAMBANOVA_MODEL_LIST="" \
211
+ # SenseNova
212
+ SENSENOVA_API_KEY="" SENSENOVA_MODEL_LIST="" \
213
+ # SiliconCloud
214
+ SILICONCLOUD_API_KEY="" SILICONCLOUD_MODEL_LIST="" SILICONCLOUD_PROXY_URL="" \
215
+ # Spark
216
+ SPARK_API_KEY="" SPARK_MODEL_LIST="" \
217
+ # Stepfun
218
+ STEPFUN_API_KEY="" STEPFUN_MODEL_LIST="" \
219
+ # Taichu
220
+ TAICHU_API_KEY="" TAICHU_MODEL_LIST="" \
221
+ # TogetherAI
222
+ TOGETHERAI_API_KEY="" TOGETHERAI_MODEL_LIST="" \
223
+ # Upstage
224
+ UPSTAGE_API_KEY="" UPSTAGE_MODEL_LIST="" \
225
+ # vLLM
226
+ VLLM_API_KEY="" VLLM_MODEL_LIST="" VLLM_PROXY_URL="" \
227
+ # Wenxin
228
+ WENXIN_API_KEY="" WENXIN_MODEL_LIST="" \
229
+ # xAI
230
+ XAI_API_KEY="" XAI_MODEL_LIST="" XAI_PROXY_URL="" \
231
+ # 01.AI
232
+ ZEROONE_API_KEY="" ZEROONE_MODEL_LIST="" \
233
+ # Zhipu
234
+ ZHIPU_API_KEY="" ZHIPU_MODEL_LIST="" \
235
+ # Tencent Cloud
236
+ TENCENT_CLOUD_API_KEY="" TENCENT_CLOUD_MODEL_LIST=""
237
+
238
+ USER nextjs
239
+
240
+ EXPOSE 3210/tcp
241
+
242
+ ENTRYPOINT ["/bin/node"]
243
+
244
+ CMD ["/app/startServer.js"]
package/changelog/v1.json CHANGED
@@ -1,4 +1,9 @@
1
1
  [
2
+ {
3
+ "children": {},
4
+ "date": "2025-02-18",
5
+ "version": "1.60.9"
6
+ },
2
7
  {
3
8
  "children": {
4
9
  "improvements": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.60.8",
3
+ "version": "1.60.9",
4
4
  "description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",