fix(update): Docker 更新只拉 artex 镜像,不动 postgres

postgres 固定 16-alpine 无需跟着升级,pull/up 带上服务名即可;artex 声明了
depends_on postgres,pg 没起会自动拉起,已在跑的不重建。
This commit is contained in:
Autumn-27 committed 2026-08-19 11:12:26 -04:00
1 parent ca2c5e45a9
commit c436b9d7d8
1 file changed
+6 -3
+6 -3
View File
@@ -38,10 +38,13 @@ update_docker(){
ok "已将 ARTEX_TAG 设为 ${tag}" ok "已将 ARTEX_TAG 设为 ${tag}"
fi fi
info "拉取新镜像…" # 只动 artex:postgres 是固定的 16-alpine,不需要跟着升级(拉它纯属浪费带宽,
docker compose pull # 且大版本变动还会有兼容风险)。artex 声明了 depends_on postgres,所以带服务名
# up 时若 pg 没起会自动拉起,已在跑的则原样保留、不重建。
info "拉取新镜像(仅 artex)…"
docker compose pull artex
info "重建并启动(artex 重启时自动迁移 schema)…" info "重建并启动(artex 重启时自动迁移 schema)…"
docker compose up -d docker compose up -d artex
ok "更新完成 → http://localhost:8787" ok "更新完成 → http://localhost:8787"
info "查看日志:docker compose logs -f artex" info "查看日志:docker compose logs -f artex"
info "清理旧镜像(可选):docker image prune -f" info "清理旧镜像(可选):docker image prune -f"