fix: decrypt

This commit is contained in:
zzc
2025-05-05 18:14:22 +08:00
parent 496a0cce52
commit 36ad546e99
13 changed files with 8815 additions and 6561 deletions

34
Dockerfile Normal file
View File

@@ -0,0 +1,34 @@
# 1⃣ 构建阶段
FROM node:18 AS build
# 设置工作目录
WORKDIR /app
# 拷贝 package.json 并安装依赖(可利用缓存)
COPY package*.json ./
COPY . .
ENV CI=true
ENV NODE_OPTIONS=--openssl-legacy-provider
RUN npm install pnpm -g
RUN pnpm install --force
# 拷贝全部代码并构建
RUN pnpm run build
# 2⃣ 生产部署阶段(用 nginx 托管)
FROM nginx:alpine
# 拷贝构建好的 dist 到 nginx 的 html 目录
COPY --from=build /app/dist /usr/share/nginx/html
# 拷贝自定义 nginx 配置(可选)
COPY nginx.conf /etc/nginx/conf.d/default.conf
# 默认端口
EXPOSE 80
# 启动 nginx
CMD ["nginx", "-g", "daemon off;"]