opt: optimize the build script and docker-compose yaml file

This commit is contained in:
RockYang 2023-07-31 17:31:02 +08:00
parent c6062ee70e
commit 54fe4b7588
5 changed files with 9 additions and 9 deletions

View File

@ -35,12 +35,12 @@ 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://172.28.173.76:6789; # 这里改成后端服务的内网 IP 地址
proxy_pass http://172.22.11.47:5678; # 这里改成后端服务的内网 IP 地址
}
# 静态资源转发
location /static/ {
proxy_pass http://172.28.173.76:6789; # 这里改成后端服务的内网 IP 地址
proxy_pass http://172.22.11.47:5678; # 这里改成后端服务的内网 IP 地址
}
}
}
}

View File

@ -2,14 +2,14 @@ version: '3'
services:
# 后端 API 程序
chatgpt-plus-go:
image: chatgpt-plus-go:v3.0.5
image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:v3.0.5.2
container_name: chatgpt-plus-go
restart: always
environment:
- DEBUG=false
- CONFIG_FILE=config.toml
ports:
- "6789:5678"
- "5678:5678"
volumes:
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
- ./conf/config.toml:/var/www/app/config.toml
@ -17,7 +17,7 @@ services:
# 前端应用
chatgpt-vue:
image: chatgpt-plus-vue:v3.0.5
image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:v3.0.5.2
container_name: chatgpt-plus-vue
restart: always
ports:

View File

@ -1,5 +1,5 @@
# GO api docker 镜像创建
FROM registry.cn-hangzhou.aliyuncs.com/geekmaster/ubuntu-ca:22.04
FROM alpine:3.18.2
MAINTAINER yangjian<yangjian102621@163.com>

View File

@ -1,5 +1,5 @@
# 前端 Vue 项目构建
FROM nginx:1.20.2
FROM nginx:1.20
MAINTAINER yangjian<yangjian102621@163.com>

View File

@ -132,7 +132,7 @@ const save = function () {
const remove = function (row) {
httpGet('/api/admin/apikey/remove?id=' + row.id).then(() => {
ElMessage.success("删除成功!")
item.value = removeArrayItem(items.value, row, (v1, v2) => {
items.value = removeArrayItem(items.value, row, (v1, v2) => {
return v1.id === v2.id
})
}).catch((e) => {