From ded672001bca1e2ccee777cf62a6232f7577e42a Mon Sep 17 00:00:00 2001 From: AceDataCloud Date: Mon, 18 Dec 2023 02:38:24 +0800 Subject: [PATCH] update deployment --- Dockerfile | 1 - deploy/production/deployment.yaml | 12 ++++++------ deploy/production/ingress.yaml | 8 ++++---- deploy/production/service.yaml | 6 +++--- deploy/test/deployment.yaml | 12 ++++++------ deploy/test/ingress.yaml | 8 ++++---- deploy/test/service.yaml | 6 +++--- index.html | 2 +- src/App.vue | 2 -- src/i18n/zh/conversation/index.ts | 7 ------- src/i18n/zh/conversation/message.ts | 28 ---------------------------- src/i18n/zh/conversation/title.ts | 5 ----- src/pages/auth/Login.vue | 6 +++--- src/pages/midjourney/Index.vue | 6 +++--- src/router/index.ts | 2 ++ src/store/index.ts | 2 +- src/utils/baseUrl.ts | 8 ++++---- 17 files changed, 40 insertions(+), 81 deletions(-) delete mode 100644 src/i18n/zh/conversation/index.ts delete mode 100644 src/i18n/zh/conversation/message.ts delete mode 100644 src/i18n/zh/conversation/title.ts diff --git a/Dockerfile b/Dockerfile index 08ffbf68..e33911cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,6 @@ WORKDIR /app COPY package.json yarn.lock ./ RUN yarn COPY . . -RUN yarn run init:https RUN yarn build # production stage diff --git a/deploy/production/deployment.yaml b/deploy/production/deployment.yaml index 5a961018..f84072af 100644 --- a/deploy/production/deployment.yaml +++ b/deploy/production/deployment.yaml @@ -2,23 +2,23 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app: chat-frontend - name: chat-frontend + app: hub-frontend + name: hub-frontend namespace: zhishuyun spec: replicas: 2 revisionHistoryLimit: 5 selector: matchLabels: - app: chat-frontend + app: hub-frontend template: metadata: labels: - app: chat-frontend + app: hub-frontend spec: containers: - - image: ghcr.io/zhishuyun/chat-frontend:${TAG} - name: chat-frontend + - image: ghcr.io/zhishuyun/hub-frontend:${TAG} + name: hub-frontend ports: - containerPort: 80 livenessProbe: diff --git a/deploy/production/ingress.yaml b/deploy/production/ingress.yaml index 8b4b5a8f..2a8b752e 100644 --- a/deploy/production/ingress.yaml +++ b/deploy/production/ingress.yaml @@ -1,7 +1,7 @@ apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: - name: chat-frontend + name: hub-frontend namespace: zhishuyun annotations: kubernetes.io/ingress.class: 'nginx' @@ -10,13 +10,13 @@ metadata: spec: tls: - hosts: - - chat.zhishuyun.com + - hub.zhishuyun.com secretName: tls-wildcard-zhishuyun-com rules: - - host: chat.zhishuyun.com + - host: hub.zhishuyun.com http: paths: - backend: - serviceName: chat-frontend + serviceName: hub-frontend servicePort: 8083 path: / diff --git a/deploy/production/service.yaml b/deploy/production/service.yaml index bf83b83b..ad1e2dc7 100644 --- a/deploy/production/service.yaml +++ b/deploy/production/service.yaml @@ -2,8 +2,8 @@ apiVersion: v1 kind: Service metadata: labels: - app: chat-frontend - name: chat-frontend + app: hub-frontend + name: hub-frontend namespace: zhishuyun spec: ports: @@ -11,4 +11,4 @@ spec: port: 8083 targetPort: 80 selector: - app: chat-frontend + app: hub-frontend diff --git a/deploy/test/deployment.yaml b/deploy/test/deployment.yaml index 09d00b2a..012d0beb 100644 --- a/deploy/test/deployment.yaml +++ b/deploy/test/deployment.yaml @@ -2,23 +2,23 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - app: chat-frontend - name: chat-frontend + app: hub-frontend + name: hub-frontend namespace: zhishuyun-test spec: replicas: 1 revisionHistoryLimit: 5 selector: matchLabels: - app: chat-frontend + app: hub-frontend template: metadata: labels: - app: chat-frontend + app: hub-frontend spec: containers: - - image: ghcr.io/zhishuyun/chat-frontend:${TAG} - name: chat-frontend + - image: ghcr.io/zhishuyun/hub-frontend:${TAG} + name: hub-frontend ports: - containerPort: 80 resources: diff --git a/deploy/test/ingress.yaml b/deploy/test/ingress.yaml index a2fe3939..c2f67355 100644 --- a/deploy/test/ingress.yaml +++ b/deploy/test/ingress.yaml @@ -1,7 +1,7 @@ apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: - name: chat-frontend + name: hub-frontend namespace: zhishuyun-test annotations: kubernetes.io/ingress.class: 'nginx' @@ -10,13 +10,13 @@ metadata: spec: tls: - hosts: - - chat.test.zhishuyun.com + - hub.test.zhishuyun.com secretName: tls-wildcard-test-zhishuyun-com rules: - - host: chat.test.zhishuyun.com + - host: hub.test.zhishuyun.com http: paths: - backend: - serviceName: chat-frontend + serviceName: hub-frontend servicePort: 8083 path: / diff --git a/deploy/test/service.yaml b/deploy/test/service.yaml index 57f844bd..6ba95e11 100644 --- a/deploy/test/service.yaml +++ b/deploy/test/service.yaml @@ -2,8 +2,8 @@ apiVersion: v1 kind: Service metadata: labels: - app: chat-frontend - name: chat-frontend + app: hub-frontend + name: hub-frontend namespace: zhishuyun-test spec: ports: @@ -11,4 +11,4 @@ spec: port: 8083 targetPort: 80 selector: - app: chat-frontend + app: hub-frontend diff --git a/index.html b/index.html index 1d2eb169..13cd2847 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - 知数云 + 知数云 - 数字化服务的智慧之选
diff --git a/src/App.vue b/src/App.vue index 6b969be0..f81cc74a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -21,12 +21,10 @@ export default defineComponent({ }, async mounted() { const { data: user } = await userOperator.getMe(); - console.log('suer', user); this.$store.dispatch('setUser', user); const { data: applications } = await applicationOperator.getAll({ user_id: user.id }); - console.log('applicatioins', applications); this.$store.dispatch('setApplications', applications); } }); diff --git a/src/i18n/zh/conversation/index.ts b/src/i18n/zh/conversation/index.ts deleted file mode 100644 index b2e6f562..00000000 --- a/src/i18n/zh/conversation/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import message from './message'; -import title from './title'; - -export default { - message, - title -}; diff --git a/src/i18n/zh/conversation/message.ts b/src/i18n/zh/conversation/message.ts deleted file mode 100644 index 26dc87de..00000000 --- a/src/i18n/zh/conversation/message.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default { - noToken: '请先申请对应服务', - newMessagePlaceholder: '请输入你的问题...', - noInput: '问题不能为空', - apiInfo: '本服务由「知数云」提供技术支持', - tryForFree: '免费使用', - initializing: '初始化中,请稍后...', - writeCode: '写一段 JavaScript 代码,输出 Hello World', - writeEmail: '写一封邮件给 Bob,告诉他我刚刚搬家了', - explainDefinition: '用简单的术语解释量子计算', - rememberHistory: '可以记住用户说过的话', - supportStream: '支持流式数据传输', - rejectInvalidPrompt: '可以拒绝回答不恰当的提问', - generateInCorrect: '可能偶尔产生不正确的信息', - generateHarmfulInfo: '可能偶尔产生有害的指令或有偏见的内容', - onlyKnowBefore2021: '对2021年之后的世界和事件了解有限', - errorBusy: 'Worker正在忙碌中,请稍后重试', - errorApiError: '回答失败,请稍后重试', - errorBadRequest: '请求内容不规范,请重新提问', - errorNoConversation: '对话内容不存在或者已经过期,请发起新的会话', - confirmDelete: '确定删除', - errorUsedUp: '您的套餐次数已经用完,请购买更多次数继续使用', - errorUnknown: '服务器出现未知错误,请稍后重试或联系客服', - errorTimeout: '回答问题超时,请稍后重试', - howToBreakLine: '按 Shift+Enter 键可以换行', - remainingCount: '剩余次数', - usedCount: '使用次数' -}; diff --git a/src/i18n/zh/conversation/title.ts b/src/i18n/zh/conversation/title.ts deleted file mode 100644 index 105b9693..00000000 --- a/src/i18n/zh/conversation/title.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - example: '样例', - capabilities: '功能', - limitations: '限制' -}; diff --git a/src/pages/auth/Login.vue b/src/pages/auth/Login.vue index dccadd49..0a997853 100644 --- a/src/pages/auth/Login.vue +++ b/src/pages/auth/Login.vue @@ -1,5 +1,5 @@