fix(deploy): 一键部署 - 避免 GHCR 匿名拉取失败 (#26) (#32)

Co-authored-by: linxi <linxi@enjoysoftware.cn>
This commit is contained in:
naidalao
2026-07-23 14:04:54 +08:00
committed by GitHub
parent b906eb9ac4
commit f26f9983bc
4 changed files with 30 additions and 19 deletions

View File

@@ -126,7 +126,9 @@ download_compose() {
start_services() {
step "拉取并启动 GHCR 网页与后端镜像"
docker compose --env-file .env -f "$COMPOSE_FILE" pull
if ! docker compose --env-file .env -f "$COMPOSE_FILE" pull; then
fail "GHCR 镜像拉取失败;如果容器包尚未公开,请通过 GHCR_USERNAME 和 GHCR_TOKEN 登录后重试"
fi
docker compose --env-file .env -f "$COMPOSE_FILE" up -d --remove-orphans --wait --wait-timeout 600
}