From f60447a77454ed24ecbbca8e000ef32e5c61185a Mon Sep 17 00:00:00 2001 From: bunny <1319900154@qq.com> Date: Sat, 24 May 2025 15:37:03 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20=E6=89=93=E5=8C=85=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .gitlab-ci.yml | 5 +++-- build/plugins.ts | 4 +++- docker/Dockerfile | 4 ++-- pnpm-lock.yaml | 2 ++ 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index a547bf3..005622e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ lerna-debug.log* node_modules dist +fakeServer dist-ssr *.local diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 55afb95..5ddbc66 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ build-job: # 打印编译开始信息 - echo "Compiling the code..." # 使用Maven编译Java项目,跳过测试 - - npm i -g pnpm && pnpm i && pnpm build + - npm i -g pnpm && pnpm i # 打印编译完成信息 - echo "Compile complete." # 从Docker Hub拉取OpenJDK基础镜像 @@ -29,7 +29,8 @@ build-job: # 打印拉取完成信息 - echo "docker pull complete." # 使用Dockerfile构建Docker镜像,并打上标签 - - cd docker && docker build -f Dockerfile -t $CONTAINER_NAME:$DOCKER_TAG . + - ls + - pnpm build && cd docker && docker build -f Dockerfile -t $CONTAINER_NAME:$DOCKER_TAG . # 打印构建成功信息 - echo "Application successfully deployed." diff --git a/build/plugins.ts b/build/plugins.ts index 0658976..8a0793f 100644 --- a/build/plugins.ts +++ b/build/plugins.ts @@ -57,7 +57,9 @@ const useMock = (mode: string) => { logger: true, include: 'mock', infixName: false, - enableProd: true, // 线上支持mock + // enableProd: true, + // build: true, + // http2: true, }) : null; }; diff --git a/docker/Dockerfile b/docker/Dockerfile index 8686e0a..8a1123f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -19,9 +19,9 @@ RUN echo "Asia/Shanghai" > /etc/timezone WORKDIR /usr/share/nginx/html # 将前端项目打包文件复制到 Nginx 的默认静态文件目录 -COPY dist/ /usr/share/nginx/html +COPY docker/dist/ /usr/share/nginx/html # 复制到nginx目录下 -COPY dist/ /etc/nginx/html +COPY docker/dist/ /etc/nginx/html # 暴露 Nginx 的默认端口 EXPOSE 80 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c1b881a..7c66dcd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,8 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +packageExtensionsChecksum: sha256-P0QlM8/kU0utlq/9p9JMVRZfIyZpKq+o9SyM/Bghnd4= + importers: .: