mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-18 01:06:39 +08:00
opt: 优化 docker-compse 构建脚本,修复后端路由 Bug
This commit is contained in:
parent
1795a891ce
commit
d03ed6570b
@ -292,7 +292,7 @@ make linux
|
||||
个人的力量始终有限,任何形式的贡献都是欢迎的,包括但不限于贡献代码,优化文档,提交 issue 和 PR 等。
|
||||
**尤其是新版本的开发计划比较大,包括各种语言的后端 API 实现,本人精力有限,希望借助社区的力量来完成这些 API 的开发。**
|
||||
|
||||
如果有兴趣的话,也可以加微信进入微信讨论群。
|
||||
如果有兴趣的话,也可以加微信进入微信讨论群(**添加好友时请注明来自Github!!!**)。
|
||||
|
||||

|
||||
|
||||
|
@ -12,20 +12,20 @@ npm run build
|
||||
cd ../docker
|
||||
|
||||
# remove docker image if exists
|
||||
docker rmi registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:$version
|
||||
docker rmi chatgpt-plus-go:$version
|
||||
# build docker image for chatgpt-plus-go
|
||||
docker build -t chatgpt-plus-go:$version -f dockerfile-api-go ../
|
||||
|
||||
# build docker image for chatgpt-plus-vue
|
||||
docker rmi registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:$version
|
||||
docker rmi chatgpt-plus-vue:$version
|
||||
docker build -t chatgpt-plus-vue:$version -f dockerfile-vue ../
|
||||
|
||||
# add tag for aliyum docker registry
|
||||
goImageId=`docker images |grep chatgpt-plus-go |grep $version |awk '{print $3}'`
|
||||
docker rmi registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:$version
|
||||
docker tag $goImageId registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:$version
|
||||
|
||||
vueImageId=`docker images |grep chatgpt-plus-vue |grep $version |awk '{print $3}'`
|
||||
docker rmi registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:$version
|
||||
docker tag $vueImageId registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:$version
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
Listen = "0.0.0.0:5678"
|
||||
ProxyURL = "http://127.0.0.1:7777"
|
||||
ProxyURL = "http://192.168.3.200:7777"
|
||||
MysqlDns = "root:12345678@tcp(192.168.3.200:3306)/chatgpt_plus?charset=utf8mb4&parseTime=True&loc=Local"
|
||||
|
||||
[Session]
|
||||
|
@ -35,7 +35,7 @@ server {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_pass http://192.168.3.200:5678; # 这里改成后端服务的内网 IP 地址
|
||||
proxy_pass http://192.168.3.200:6789; # 这里改成后端服务的内网 IP 地址
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,21 +2,20 @@ version: '3'
|
||||
services:
|
||||
# 后端 API 程序
|
||||
chatgpt-plus-go:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:v3.0.0
|
||||
# image: chatplus-go:v3.0.0
|
||||
image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:v3.0.1
|
||||
# image: chatgpt-plus-go:v3.0.1
|
||||
container_name: chatgpt-plus-go
|
||||
#build: ./
|
||||
restart: always
|
||||
# network_mode: host
|
||||
# network_mode: host
|
||||
ports:
|
||||
- "5678:5678"
|
||||
- "6789:5678"
|
||||
volumes:
|
||||
- ./conf/config.toml:/var/www/app/config.toml
|
||||
|
||||
# 前端应用
|
||||
chatgpt-vue:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:v3.0.0
|
||||
# image: chatplus-vue:v3.0.0
|
||||
image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:v3.0.1
|
||||
# image: chatgpt-plus-vue:v3.0.1
|
||||
container_name: chatgpt-plus-vue
|
||||
#build: ./
|
||||
restart: always
|
||||
|
@ -8,5 +8,8 @@ COPY ./api/go/bin/chatgpt-v3-amd64-linux /var/www/app
|
||||
|
||||
EXPOSE 5678
|
||||
|
||||
RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
|
||||
|
||||
# 容器启动时执行的命令
|
||||
CMD ["./chatgpt-v3-amd64-linux"]
|
||||
|
@ -6,4 +6,6 @@ MAINTAINER yangjian<yangjian102621@163.com>
|
||||
WORKDIR /var/www/app
|
||||
COPY ./web/dist /var/www/app/dist
|
||||
|
||||
EXPOSE 80 443 8080
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
EXPOSE 8080
|
@ -15,6 +15,12 @@ const routes = [
|
||||
{name: 'login', path: '/login', component: Login, meta: {title: '用户登录'}},
|
||||
{name: 'register', path: '/register', component: Register, meta: {title: '用户注册'}},
|
||||
{name: 'plus', path: '/chat', component: ChatPlus, meta: {title: 'ChatGPT-智能助手V3'}},
|
||||
{
|
||||
path: '/admin/login',
|
||||
name: 'admin-login',
|
||||
meta: {title: 'Chat-Plus 控制台登录'},
|
||||
component: () => import('@/views/admin/Login.vue'),
|
||||
},
|
||||
{
|
||||
name: 'admin',
|
||||
path: '/admin',
|
||||
@ -22,12 +28,6 @@ const routes = [
|
||||
component: () => import("@/views/admin/Home.vue"),
|
||||
meta: {title: 'ChatGPT-Plus 管理后台'},
|
||||
children: [
|
||||
{
|
||||
path: '/admin/welcome',
|
||||
name: 'admin-home',
|
||||
meta: {title: 'Chat-Plus 控制台登录'},
|
||||
component: () => import('@/views/admin/Login.vue'),
|
||||
},
|
||||
{
|
||||
path: '/admin/welcome',
|
||||
name: 'admin-home',
|
||||
|
Loading…
Reference in New Issue
Block a user