From 55459a4f42dc910180983d1e393b37d79f47b78c Mon Sep 17 00:00:00 2001 From: RockYang Date: Mon, 31 Jul 2023 17:31:02 +0800 Subject: [PATCH] opt: optimize the build script and docker-compose yaml file --- docker/conf/nginx/conf.d/chatgpt-plus.conf | 6 +++--- docker/docker-compose.yaml | 6 +++--- docker/dockerfile-api-go | 2 +- docker/dockerfile-vue | 2 +- web/src/views/admin/ApiKey.vue | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docker/conf/nginx/conf.d/chatgpt-plus.conf b/docker/conf/nginx/conf.d/chatgpt-plus.conf index c151a6d8..2338f996 100644 --- a/docker/conf/nginx/conf.d/chatgpt-plus.conf +++ b/docker/conf/nginx/conf.d/chatgpt-plus.conf @@ -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 地址 } } -} \ No newline at end of file +} diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index cd2a1bd6..fd4837ae 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -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: diff --git a/docker/dockerfile-api-go b/docker/dockerfile-api-go index 902fc94e..0ebe6817 100644 --- a/docker/dockerfile-api-go +++ b/docker/dockerfile-api-go @@ -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 diff --git a/docker/dockerfile-vue b/docker/dockerfile-vue index 46533a97..217a327a 100644 --- a/docker/dockerfile-vue +++ b/docker/dockerfile-vue @@ -1,5 +1,5 @@ # 前端 Vue 项目构建 -FROM nginx:1.20.2 +FROM nginx:1.20 MAINTAINER yangjian diff --git a/web/src/views/admin/ApiKey.vue b/web/src/views/admin/ApiKey.vue index 5ba1b914..f3c679ae 100644 --- a/web/src/views/admin/ApiKey.vue +++ b/web/src/views/admin/ApiKey.vue @@ -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) => {