Connect release initialization to runner-local PostgreSQL
This commit is contained in:
@@ -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" \
|
||||
|
||||
Reference in New Issue
Block a user