music(chord): 加 yopu.co 吉他谱自动抓取(sidecar 模式)
复刻 ../guitar 的功能: - 新加 chord-fetcher sidecar(python 3.11 + chromium + selenium),跟 main 同 pod 共享 PVC - yopu.py v2:搜「和弦谱」→ 进 view → 选 谱面样式=功能谱 + 和弦样式=级数名 → 截 sheet-container → PIL 裁白边 - music backend 加 POST /api/pieces/:id/chord/fetch + GET /chord/status,转发 sidecar 并把 png import 成 image attachment role=chord - 前端 chord tab 在没图时显示「自动抓取」按钮,点了 polling 状态、完成后刷新 - CI build 两个 image(music + music-chord),rollout 同步切版本
This commit is contained in:
@@ -51,6 +51,8 @@ spec:
|
||||
value: /data/app.db
|
||||
- name: BLOBS_DIR
|
||||
value: /data/blobs
|
||||
- name: CHORD_URL
|
||||
value: http://localhost:8001
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
@@ -73,6 +75,38 @@ spec:
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
- name: chord-fetcher
|
||||
image: registry.famzheng.me/mochi/music-chord:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8001
|
||||
name: chord
|
||||
env:
|
||||
- name: CHORD_OUT_DIR
|
||||
value: /data/chord-fetch
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: chord
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: chord
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 256Mi
|
||||
# chromium 内存峰值很容易飙到 ~600MB
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
|
||||
Reference in New Issue
Block a user