28713e489f
后端 axum + sqlite,图片直接 BLOB 存进 pages 表(单张 ≤ 10MB / 单 谱 ≤ 64 页),5 个 endpoint:multipart upload、列表、详情、单页图片 (带 immutable cache header)+ healthz。 前端 vue3 + pinia + vue-router,3 个视图:列表(卡片网格 + 首页缩 略)、上传(拖拽 + 顺序预览)、阅读(全屏,左右点按 / 键盘 / 拖 拽进度条翻页,2.5s 自动隐藏 chrome)。视图状态走 URL(reader 的 当前页是 ?page=N)。 部署:cube-piano-sheet ns + 10Gi PVC + traefik ingress + 一条 buffering middleware 把 body 上限抬到 700MB。镜像 < 20MB(scratch + musl 静态)。
31 lines
728 B
YAML
31 lines
728 B
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: piano-sheet
|
|
namespace: cube-piano-sheet
|
|
annotations:
|
|
# 上传整组图片可能 ~600MB,调高 traefik 默认上限
|
|
traefik.ingress.kubernetes.io/router.middlewares: cube-piano-sheet-bodylimit@kubernetescrd
|
|
spec:
|
|
ingressClassName: traefik
|
|
rules:
|
|
- host: piano.famzheng.me
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: piano-sheet
|
|
port:
|
|
number: 80
|
|
---
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: Middleware
|
|
metadata:
|
|
name: bodylimit
|
|
namespace: cube-piano-sheet
|
|
spec:
|
|
buffering:
|
|
maxRequestBodyBytes: 700000000
|