chore: add configs + logo assets

This commit is contained in:
2026-08-25 16:29:08 +08:00
parent a56b920feb
commit 4a17e3be2b
13 changed files with 72 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
# ── Stage 1: Build ──────────────────────────────────
FROM node:20-alpine AS builder
WORKDIR /app
# 先复制依赖描述文件,利用 Docker 缓存层
COPY package.json package-lock.json* ./
# 安装依赖
RUN npm install
# 复制源码
COPY . .
# 构建生产包(tsc + vite build → dist/)
RUN npm run build
# ── Stage 2: Serve ──────────────────────────────────
FROM nginx:alpine
# 将构建产物复制到 Nginx 默认静态目录
COPY --from=builder /app/dist /usr/share/nginx/html
# 自定义 Nginx 配置:支持 SPA 路由 fallback + gzip
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]