📦 打包设置

This commit is contained in:
bunny 2025-05-24 15:37:03 +08:00
parent aefc88fe5d
commit f60447a774
5 changed files with 11 additions and 5 deletions

1
.gitignore vendored
View File

@ -9,6 +9,7 @@ lerna-debug.log*
node_modules
dist
fakeServer
dist-ssr
*.local

View File

@ -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."

View File

@ -57,7 +57,9 @@ const useMock = (mode: string) => {
logger: true,
include: 'mock',
infixName: false,
enableProd: true, // 线上支持mock
// enableProd: true,
// build: true,
// http2: true,
})
: null;
};

View File

@ -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

View File

@ -4,6 +4,8 @@ settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
packageExtensionsChecksum: sha256-P0QlM8/kU0utlq/9p9JMVRZfIyZpKq+o9SyM/Bghnd4=
importers:
.: