feat: pull bootstrap image from public registry
This commit is contained in:
+2
-3
@@ -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:
|
||||
|
||||
+2
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user