@lobehub/chat 0.83.9 → 0.84.0-beta.1
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/.dockerignore +10 -0
- package/.github/workflows/release.yml +3 -0
- package/.releaserc.js +14 -1
- package/CHANGELOG.md +25 -0
- package/Dockerfile +46 -0
- package/next.config.mjs +3 -0
- package/package.json +3 -1
package/.dockerignore
ADDED
|
@@ -3,6 +3,7 @@ on:
|
|
|
3
3
|
push:
|
|
4
4
|
branches:
|
|
5
5
|
- main
|
|
6
|
+
- beta
|
|
6
7
|
|
|
7
8
|
jobs:
|
|
8
9
|
release:
|
|
@@ -28,3 +29,5 @@ jobs:
|
|
|
28
29
|
env:
|
|
29
30
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
30
31
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
32
|
+
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
|
33
|
+
DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
|
package/.releaserc.js
CHANGED
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
const release = require('@lobehub/lint').semanticRelease;
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
...release,
|
|
5
|
+
plugins: [
|
|
6
|
+
...release.plugins,
|
|
7
|
+
[
|
|
8
|
+
'@codedependant/semantic-release-docker',
|
|
9
|
+
{
|
|
10
|
+
dockerImage: 'lobe-chat',
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
],
|
|
14
|
+
};
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 0.84.0-beta.1](https://github.com/lobehub/lobe-chat/compare/v0.83.9...v0.84.0-beta.1)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-10-09**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **misc**: Dockerize lobe-chat.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's improved
|
|
19
|
+
|
|
20
|
+
- **misc**: Dockerize lobe-chat ([1b750f8](https://github.com/lobehub/lobe-chat/commit/1b750f8))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 0.83.9](https://github.com/lobehub/lobe-chat/compare/v0.83.8...v0.83.9)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2023-10-08**</sup>
|
package/Dockerfile
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
FROM node:20-slim AS base
|
|
2
|
+
ENV PNPM_HOME="/pnpm"
|
|
3
|
+
ENV PATH="$PNPM_HOME:$PATH"
|
|
4
|
+
RUN corepack enable
|
|
5
|
+
|
|
6
|
+
## Install dependencies only when needed
|
|
7
|
+
FROM base AS builder
|
|
8
|
+
WORKDIR /app
|
|
9
|
+
|
|
10
|
+
COPY package.json ./
|
|
11
|
+
|
|
12
|
+
# If you want to build docker in China
|
|
13
|
+
RUN npm config set registry https://registry.npmmirror.com/
|
|
14
|
+
RUN pnpm install
|
|
15
|
+
|
|
16
|
+
COPY . .
|
|
17
|
+
RUN pnpm run build:docker # run build standalone for docker version
|
|
18
|
+
|
|
19
|
+
## Production image, copy all the files and run next
|
|
20
|
+
FROM base AS runner
|
|
21
|
+
WORKDIR /app
|
|
22
|
+
|
|
23
|
+
ENV NODE_ENV production
|
|
24
|
+
|
|
25
|
+
RUN addgroup --system --gid 1001 nodejs
|
|
26
|
+
RUN adduser --system --uid 1001 nextjs
|
|
27
|
+
|
|
28
|
+
COPY --from=builder /app/public ./public
|
|
29
|
+
|
|
30
|
+
# Set the correct permission for prerender cache
|
|
31
|
+
RUN mkdir .next
|
|
32
|
+
RUN chown nextjs:nodejs .next
|
|
33
|
+
|
|
34
|
+
# Automatically leverage output traces to reduce image size
|
|
35
|
+
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
|
36
|
+
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
|
37
|
+
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
38
|
+
|
|
39
|
+
USER nextjs
|
|
40
|
+
|
|
41
|
+
EXPOSE 3000
|
|
42
|
+
|
|
43
|
+
# set hostname to localhost
|
|
44
|
+
ENV HOSTNAME "0.0.0.0"
|
|
45
|
+
|
|
46
|
+
CMD ["node", "server.js"]
|
package/next.config.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import analyzer from '@next/bundle-analyzer';
|
|
|
2
2
|
import nextPWA from 'next-pwa';
|
|
3
3
|
|
|
4
4
|
const isProd = process.env.NODE_ENV === 'production';
|
|
5
|
+
const buildWithDocker = process.env.DOCKER === 'true';
|
|
5
6
|
|
|
6
7
|
const withBundleAnalyzer = analyzer({
|
|
7
8
|
enabled: process.env.ANALYZE === 'true',
|
|
@@ -32,6 +33,8 @@ const nextConfig = {
|
|
|
32
33
|
AGENTS_INDEX_URL: process.env.AGENTS_INDEX_URL,
|
|
33
34
|
PLUGINS_INDEX_URL: process.env.PLUGINS_INDEX_URL,
|
|
34
35
|
},
|
|
36
|
+
|
|
37
|
+
output: buildWithDocker ? 'standalone' : undefined,
|
|
35
38
|
};
|
|
36
39
|
|
|
37
40
|
export default isProd ? withBundleAnalyzer(withPWA(nextConfig)) : nextConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.84.0-beta.1",
|
|
4
4
|
"description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chatbot",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "next build",
|
|
27
27
|
"build:analyze": "ANALYZE=true next build",
|
|
28
|
+
"build:docker": "DOCKER=true next build",
|
|
28
29
|
"dev": "next dev -p 3010",
|
|
29
30
|
"i18n": "npm run i18n:workflow && lobe-i18n",
|
|
30
31
|
"i18n:workflow": "ts-node --project ./tsconfig.json scripts/i18nWorkflow/index.ts",
|
|
@@ -119,6 +120,7 @@
|
|
|
119
120
|
"zustand-utils": "^1"
|
|
120
121
|
},
|
|
121
122
|
"devDependencies": {
|
|
123
|
+
"@codedependant/semantic-release-docker": "^4",
|
|
122
124
|
"@commitlint/cli": "^17",
|
|
123
125
|
"@lobehub/i18n-cli": "latest",
|
|
124
126
|
"@lobehub/lint": "latest",
|