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
+7
View File
@@ -0,0 +1,7 @@
node_modules
dist
.git
.gitignore
*.md
.vscode
.idea
+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;"]
+29
View File
@@ -0,0 +1,29 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# gzip 压缩
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml;
gzip_min_length 256;
# SPA 路由 fallback:所有非文件请求回退到 index.html
location / {
try_files $uri $uri/ /index.html;
}
# 静态资源长缓存(Vite 构建产物带 hash)
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# SVG / 图片缓存
location ~* \.(svg|png|jpg|jpeg|gif|ico|webp)$ {
expires 30d;
add_header Cache-Control "public";
}
}
+6
View File
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB