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: .: