修改Logo链接,更新依赖,Dockerfile文件

This commit is contained in:
2024-09-24 14:39:06 +08:00
parent 63829ebbc1
commit b000d13c93
7 changed files with 8163 additions and 7357 deletions

View File

@ -1,11 +1,26 @@
# 使用官方 Node.js 运行时作为父镜像
FROM node:18-alpine AS build-stage
# 设置工作目录
WORKDIR /app
# 将应用的源代码复制到容器中
COPY . .
# 安装 Yarn
RUN npm install -g yarn && yarn install && yarn build
# 使用Nginx作为基础镜像
FROM nginx:alpine as builder
# 删除默认的 Nginx 网站
RUN rm -rf /usr/share/nginx/html/*
# 将本地Nginx配置文件复制到容器中
COPY nginx.conf /etc/nginx/conf.d/default.conf
# 将Vue.js应用的构建产物复制到Nginx的默认目录
COPY dist /usr/share/nginx/html
COPY --from=build-stage /app/dist /usr/share/nginx/html
# 暴露Nginx端口
EXPOSE 80