From 2307402e34c1d12d86a33f12022fac43680db57c Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 30 Aug 2026 13:40:32 +0000 Subject: [PATCH] feat: pull bootstrap image from public registry --- compose.yaml | 5 ++--- install.sh | 7 ++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/compose.yaml b/compose.yaml index b164b7e..4bb132e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -14,8 +14,7 @@ services: timeout: 5s retries: 24 app: - build: {context: ., dockerfile: Dockerfile.bootstrap} - image: xymediavault-bootstrap:local + image: ${XYMEDIA_BOOTSTRAP_IMAGE:-git.keeper.work/admin/xymediavault-bootstrap:1} environment: XYMEDIA_POSTGRES_MODE: external XYMEDIA_COMPONENT_RUNTIME: local @@ -34,7 +33,7 @@ services: healthcheck: test: [CMD, /releases/current/bin/xymediavault, healthcheck, --url, http://127.0.0.1:8080/api/health] app-migrate: - image: xymediavault-bootstrap:local + image: ${XYMEDIA_BOOTSTRAP_IMAGE:-git.keeper.work/admin/xymediavault-bootstrap:1} entrypoint: [/releases/current/bin/xymediavault] command: [migrate, --new, --config, /app/config.yaml] environment: diff --git a/install.sh b/install.sh index 7bcc4d8..26fcc20 100644 --- a/install.sh +++ b/install.sh @@ -187,11 +187,8 @@ for placeholder, value in values.items(): output.write_text(content) PY cp "$COMPOSE_TEMPLATE" "$DOCKERFILE_TEMPLATE" "$INSTALL_DIR/" -if [[ ! -f "$INSTALL_DIR/.bootstrap-dockerfile.sha256" || "$(sha256sum "$INSTALL_DIR/Dockerfile.bootstrap" | cut -d' ' -f1)" != "$(<"$INSTALL_DIR/.bootstrap-dockerfile.sha256")" ]]; then - progress '构建首次 bootstrap runtime' - run_logged "${COMPOSE[@]}" --project-directory "$INSTALL_DIR" --env-file "$INSTALL_DIR/.env" -f "$INSTALL_DIR/compose.yaml" build app || die 'bootstrap runtime 构建失败' - sha256sum "$INSTALL_DIR/Dockerfile.bootstrap" | cut -d' ' -f1 >"$INSTALL_DIR/.bootstrap-dockerfile.sha256" -fi +progress '下载 bootstrap runtime' +run_logged "${COMPOSE[@]}" --project-directory "$INSTALL_DIR" --env-file "$INSTALL_DIR/.env" -f "$INSTALL_DIR/compose.yaml" pull app || die 'bootstrap runtime 下载失败;请确认能访问 git.keeper.work Container Registry' progress '启动 PostgreSQL' if [[ $PG_HOST == postgres ]]; then run_logged "${COMPOSE[@]}" --profile local-db --project-directory "$INSTALL_DIR" --env-file "$INSTALL_DIR/.env" -f "$INSTALL_DIR/compose.yaml" up -d postgres || die 'PostgreSQL 启动失败'; fi if [[ $PG_HOST == postgres ]]; then