mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-11-01 21:26:08 +08:00
Adds one-click update from the settings page so routine updates no
longer require pulling a new Docker image.
- CI attaches update-bundle-<version>.zip (+ .sha256) to each release:
backend module tree, built webui, and a manifest; the image bakes
/app/IMAGE_VERSION as the baseline
- boot_overlay.py (shipped in the image, outside /app/module so it can
never overwrite its own deciding logic) runs from entrypoint before
the app starts: if a persisted overlay in /app/config/updates is
newer than the image it tree-replaces /app/module and /app/dist and
runs `uv sync` when the lockfile changed; if the image is newer it
clears the stale overlay. Applied via the config volume, so updates
survive container recreate; a newer pulled image always wins
- GET/POST /api/v1/update/{check,apply,rollback} (auth-gated, repo
pinned to EstrellaXD/Auto_Bangumi): check queries GitHub releases
with a stable/beta channel; apply downloads, verifies sha256, stages,
promotes current->backup, then exits the process so Docker restarts
into the overlay; rollback swaps the backup back. Progress streams
over the existing SSE channel
- Settings card (Log page) shows current/latest, release notes, channel
toggle, update + rollback, with a restart:unless-stopped requirement
note; compose examples updated
Requires restart: unless-stopped for self-restart (documented; no
Docker-socket fallback). 1043 backend tests, mypy 0, ruff clean; 135
frontend tests, vue-tsc clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTnuEgR78cBk32bLNKar3z
20 lines
578 B
YAML
20 lines
578 B
YAML
services:
|
|
AutoBangumi:
|
|
image: "ghcr.io/estrellaxd/auto_bangumi:latest"
|
|
container_name: AutoBangumi
|
|
volumes:
|
|
- ./config:/app/config
|
|
- ./data:/app/data
|
|
network_mode: bridge
|
|
ports:
|
|
- "7892:7892"
|
|
# 应用内“一键更新”依赖此重启策略:更新后容器会自行退出,由 Docker 重启
|
|
# 以应用更新,因此必须保留 restart: unless-stopped。
|
|
restart: unless-stopped
|
|
dns:
|
|
- 223.5.5.5
|
|
environment:
|
|
- TZ=Asia/Shanghai
|
|
- PGID=${PGID:-1000}
|
|
- PUID=${PUID:-1000}
|
|
- UMASK=022 |