Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
405aeaa2a5 | ||
|
|
fd28468778 | ||
|
|
4128d319ed | ||
|
|
4a06b3943c | ||
|
|
77cdcb7798 | ||
|
|
ee542a01f7 | ||
|
|
30372c2e70 | ||
|
|
6646695849 |
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
||||
node_modules
|
||||
Dockerfile
|
||||
.git
|
||||
.husky
|
||||
.github
|
||||
.vscode
|
||||
37
.github/workflows/build_docker.yml
vendored
Normal file
37
.github/workflows/build_docker.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: build_docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build_docker:
|
||||
name: Build docker
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: chenzhaoyu94/chatgpt-web
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -23,7 +23,9 @@
|
||||
"axios",
|
||||
"bumpp",
|
||||
"chatgpt",
|
||||
"chenzhaoyu",
|
||||
"commitlint",
|
||||
"dockerhub",
|
||||
"esno",
|
||||
"GPTAPI",
|
||||
"iconify",
|
||||
|
||||
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,3 +1,15 @@
|
||||
## v2.3.3
|
||||
|
||||
`2023-02-16`
|
||||
|
||||
### Feature
|
||||
- 添加 `README` 部份说明和贡献列表
|
||||
- 添加 `docker` 镜像
|
||||
- 添加 `GitHub Action` 自动化构建
|
||||
|
||||
### BugFix
|
||||
- 回退依赖更新导致的 [Eslint 报错](https://github.com/eslint/eslint/issues/16896)
|
||||
|
||||
## v2.3.2
|
||||
|
||||
`2023-02-16`
|
||||
|
||||
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
# build front-end
|
||||
FROM node:lts-alpine AS builder
|
||||
|
||||
COPY ./ /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install pnpm -g && pnpm install && pnpm run build
|
||||
|
||||
# service
|
||||
FROM node:lts-alpine
|
||||
|
||||
COPY /service /app
|
||||
COPY --from=builder /app/dist /app/public
|
||||
|
||||
WORKDIR /app
|
||||
RUN npm install pnpm -g && pnpm install
|
||||
|
||||
EXPOSE 3002
|
||||
|
||||
CMD ["pnpm", "run", "start"]
|
||||
38
README.md
38
README.md
@@ -97,9 +97,37 @@ pnpm prod
|
||||
|
||||
PS: 不进行打包,直接在服务器上运行 `pnpm start` 也可
|
||||
|
||||
## Docker build & run
|
||||
|
||||
[参考信息](https://github.com/Chanzhaoyu/chatgpt-web/pull/42)
|
||||
|
||||
```bash
|
||||
docker build -t chatgpt-web .
|
||||
```
|
||||
|
||||
## Docker compose
|
||||
|
||||
[Hub 地址](https://hub.docker.com/repository/docker/chenzhaoyu94/chatgpt-web/general)
|
||||
|
||||
```yml
|
||||
version: '3'
|
||||
|
||||
service:
|
||||
app:
|
||||
image: chenzhaoyu94/chatgpt-web
|
||||
ports:
|
||||
- 3002:3002
|
||||
environment:
|
||||
OPENAI_API_KEY: xxxxxx
|
||||
```
|
||||
|
||||
|
||||
### 网页
|
||||
|
||||
根目录下运行以下命令,然后将 `dist` 文件夹复制到你的托管服务器上
|
||||
|
||||
[参考信息](https://cn.vitejs.dev/guide/static-deploy.html#building-the-app)
|
||||
|
||||
```shell
|
||||
pnpm build
|
||||
```
|
||||
@@ -117,5 +145,15 @@ Q: 文件保存时全部爆红?
|
||||
|
||||
A: `vscode` 请安装项目推荐插件,或手动安装 `Eslint` 插件。
|
||||
|
||||
## 参与贡献
|
||||
|
||||
贡献之前请先阅读 [贡献指南](./CONTRIBUTING.md)
|
||||
|
||||
感谢所有做过贡献的人!
|
||||
|
||||
<a href="https://github.com/Chanzhaoyu/chatgpt-web/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=Chanzhaoyu/chatgpt-web" />
|
||||
</a>
|
||||
|
||||
## License
|
||||
MIT © [ChenZhaoYu](./license)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "chatgpt-web",
|
||||
"version": "2.3.2",
|
||||
"version": "2.3.3",
|
||||
"private": false,
|
||||
"description": "ChatGPT Web",
|
||||
"author": "ChenZhaoYu <chenzhaoyu1994@gmail.com>",
|
||||
@@ -16,6 +16,7 @@
|
||||
"preview": "vite preview",
|
||||
"build-only": "vite build",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"bootstrap": "pnpm install && pnpm run common:prepare",
|
||||
"common:cleanup": "rimraf node_modules && rimraf pnpm-lock.yaml",
|
||||
|
||||
16
pnpm-lock.yaml
generated
16
pnpm-lock.yaml
generated
@@ -1268,7 +1268,7 @@ packages:
|
||||
hasBin: true
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001452
|
||||
electron-to-chromium: 1.4.298
|
||||
electron-to-chromium: 1.4.296
|
||||
node-releases: 2.0.10
|
||||
update-browserslist-db: 1.0.10_browserslist@4.21.5
|
||||
dev: true
|
||||
@@ -1724,8 +1724,8 @@ packages:
|
||||
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
|
||||
dev: true
|
||||
|
||||
/electron-to-chromium/1.4.298:
|
||||
resolution: {integrity: sha512-dJZurgxDeaqn90VmS23Xz+QPQQl84BxnlAfwCDFNjfEhqO2yLMDkeaDoJ1yPXAbmiqTi+hd5TpB5zi1N4hwBuQ==}
|
||||
/electron-to-chromium/1.4.296:
|
||||
resolution: {integrity: sha512-i/6Q+Y9bluDa2a0NbMvdtG5TuS/1Fr3TKK8L+7UUL9QjRS5iFJzCC3r70xjyOnLiYG8qGV4/mMpe6HuAbdJW4w==}
|
||||
dev: true
|
||||
|
||||
/emoji-regex/8.0.0:
|
||||
@@ -2052,7 +2052,7 @@ packages:
|
||||
ci-info: 3.8.0
|
||||
clean-regexp: 1.0.0
|
||||
eslint: 8.34.0
|
||||
esquery: 1.4.1
|
||||
esquery: 1.4.0
|
||||
indent-string: 4.0.0
|
||||
is-builtin-module: 3.2.1
|
||||
jsesc: 3.0.2
|
||||
@@ -2186,7 +2186,7 @@ packages:
|
||||
eslint-utils: 3.0.0_eslint@8.34.0
|
||||
eslint-visitor-keys: 3.3.0
|
||||
espree: 9.4.1
|
||||
esquery: 1.4.1
|
||||
esquery: 1.4.0
|
||||
esutils: 2.0.3
|
||||
fast-deep-equal: 3.1.3
|
||||
file-entry-cache: 6.0.1
|
||||
@@ -2224,8 +2224,8 @@ packages:
|
||||
eslint-visitor-keys: 3.3.0
|
||||
dev: true
|
||||
|
||||
/esquery/1.4.1:
|
||||
resolution: {integrity: sha512-3ZggxvMv5EEY1ssUVyHSVt0oPreyBfbUi1XikJVfjFiBeBDLdrb0IWoDiEwqT/2sUQi0TGaWtFhOGDD8RTpXgQ==}
|
||||
/esquery/1.4.0:
|
||||
resolution: {integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==}
|
||||
engines: {node: '>=0.10'}
|
||||
dependencies:
|
||||
estraverse: 5.3.0
|
||||
@@ -4449,7 +4449,7 @@ packages:
|
||||
eslint-scope: 7.1.1
|
||||
eslint-visitor-keys: 3.3.0
|
||||
espree: 9.4.1
|
||||
esquery: 1.4.1
|
||||
esquery: 1.4.0
|
||||
lodash: 4.17.21
|
||||
semver: 7.3.8
|
||||
transitivePeerDependencies:
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"common:cleanup": "rimraf node_modules && rimraf pnpm-lock.yaml"
|
||||
},
|
||||
"dependencies": {
|
||||
"chatgpt": "^4.4.1",
|
||||
"chatgpt": "^4.3.2",
|
||||
"dotenv": "^16.0.3",
|
||||
"esno": "^0.16.3",
|
||||
"express": "^4.18.2",
|
||||
@@ -35,7 +35,7 @@
|
||||
"@types/node": "^18.13.0",
|
||||
"eslint": "^8.34.0",
|
||||
"rimraf": "^4.1.2",
|
||||
"tsup": "^6.6.3",
|
||||
"tsup": "^6.6.2",
|
||||
"typescript": "^4.9.5"
|
||||
}
|
||||
}
|
||||
|
||||
20
service/pnpm-lock.yaml
generated
20
service/pnpm-lock.yaml
generated
@@ -4,18 +4,18 @@ specifiers:
|
||||
'@antfu/eslint-config': ^0.35.2
|
||||
'@types/express': ^4.17.17
|
||||
'@types/node': ^18.13.0
|
||||
chatgpt: ^4.4.1
|
||||
chatgpt: ^4.3.2
|
||||
dotenv: ^16.0.3
|
||||
eslint: ^8.34.0
|
||||
esno: ^0.16.3
|
||||
express: ^4.18.2
|
||||
isomorphic-fetch: ^3.0.0
|
||||
rimraf: ^4.1.2
|
||||
tsup: ^6.6.3
|
||||
tsup: ^6.6.2
|
||||
typescript: ^4.9.5
|
||||
|
||||
dependencies:
|
||||
chatgpt: 4.4.1
|
||||
chatgpt: 4.4.0
|
||||
dotenv: 16.0.3
|
||||
esno: 0.16.3
|
||||
express: 4.18.2
|
||||
@@ -856,8 +856,8 @@ packages:
|
||||
resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==}
|
||||
dev: true
|
||||
|
||||
/chatgpt/4.4.1:
|
||||
resolution: {integrity: sha512-rccShNzq/aE4LMmwTW4IOHIAZgNRbX0KetVKRCdR4SkRXz63FWzOfu8pNbaN65gsvvXwXyRzD7W4LLDyXe4TYg==}
|
||||
/chatgpt/4.4.0:
|
||||
resolution: {integrity: sha512-rS1F423hR5marIB7hvZ4KyczK9oFloWY+AR4WKIt+HLyiRgOOWv6V4olu1HvaoOayc5+A/N2WwX0SzuU1rI9Rg==}
|
||||
engines: {node: '>=18'}
|
||||
dependencies:
|
||||
eventsource-parser: 0.0.5
|
||||
@@ -1393,7 +1393,7 @@ packages:
|
||||
ci-info: 3.8.0
|
||||
clean-regexp: 1.0.0
|
||||
eslint: 8.34.0
|
||||
esquery: 1.4.1
|
||||
esquery: 1.4.0
|
||||
indent-string: 4.0.0
|
||||
is-builtin-module: 3.2.1
|
||||
jsesc: 3.0.2
|
||||
@@ -1527,7 +1527,7 @@ packages:
|
||||
eslint-utils: 3.0.0_eslint@8.34.0
|
||||
eslint-visitor-keys: 3.3.0
|
||||
espree: 9.4.1
|
||||
esquery: 1.4.1
|
||||
esquery: 1.4.0
|
||||
esutils: 2.0.3
|
||||
fast-deep-equal: 3.1.3
|
||||
file-entry-cache: 6.0.1
|
||||
@@ -1572,8 +1572,8 @@ packages:
|
||||
eslint-visitor-keys: 3.3.0
|
||||
dev: true
|
||||
|
||||
/esquery/1.4.1:
|
||||
resolution: {integrity: sha512-3ZggxvMv5EEY1ssUVyHSVt0oPreyBfbUi1XikJVfjFiBeBDLdrb0IWoDiEwqT/2sUQi0TGaWtFhOGDD8RTpXgQ==}
|
||||
/esquery/1.4.0:
|
||||
resolution: {integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==}
|
||||
engines: {node: '>=0.10'}
|
||||
dependencies:
|
||||
estraverse: 5.3.0
|
||||
@@ -3296,7 +3296,7 @@ packages:
|
||||
eslint-scope: 7.1.1
|
||||
eslint-visitor-keys: 3.3.0
|
||||
espree: 9.4.1
|
||||
esquery: 1.4.1
|
||||
esquery: 1.4.0
|
||||
lodash: 4.17.21
|
||||
semver: 7.3.8
|
||||
transitivePeerDependencies:
|
||||
|
||||
Reference in New Issue
Block a user