Connect release initialization to runner-local PostgreSQL

This commit is contained in:
2026-12-01 01:04:51 +08:00
parent f742afc659
commit 8062a44544
3 changed files with 20 additions and 5 deletions
+8 -1
View File
@@ -12,6 +12,13 @@ fi
infra=/opt/endoleap-infra
root=$infra/bedrock-rust
network=endoleap-dev_default
render_options=()
case ${BEDROCK_PG_HOST:-} in
127.0.0.1|::1|'[::1]')
network=host
render_options+=(--runner-loopback)
;;
esac
test -d "$infra"
test ! -L "$root"
docker network inspect "$network" >/dev/null
@@ -23,7 +30,7 @@ trap cleanup EXIT
install -m 755 "$binary" "$stage/bedrock"
release="$revision.${stage##*.}"
python3 "$(dirname "$0")/render-postgres.py" "$stage/bedrock.yaml" \
--deployment production --config-version "$release"
--deployment production --config-version "$release" "${render_options[@]}"
# Run storage initialization as a one-shot command in the release container.
docker run --rm --network "$network" \