Add a versioned backend catalog and YAML deployment configuration
This commit is contained in:
+4
-3
@@ -21,16 +21,17 @@ stage=$(mktemp -d "$root/releases/.staging.XXXXXXXX")
|
||||
cleanup() { rm -rf -- "$stage"; }
|
||||
trap cleanup EXIT
|
||||
install -m 755 "$binary" "$stage/bedrock"
|
||||
python3 "$(dirname "$0")/render-postgres.py" "$stage/bedrock.json" --deployment production
|
||||
release="$revision.${stage##*.}"
|
||||
python3 "$(dirname "$0")/render-postgres.py" "$stage/bedrock.yaml" \
|
||||
--deployment production --config-version "$release"
|
||||
|
||||
# The current binary is a one-shot storage initializer. It publishes no ports.
|
||||
docker run --rm --network "$network" \
|
||||
--user "$(id -u):$(id -g)" --read-only --cap-drop ALL --security-opt no-new-privileges \
|
||||
--mount "type=bind,source=$stage,target=/release,readonly" \
|
||||
-e BEDROCK_DB_CONFIG=/release/bedrock.json \
|
||||
-e BEDROCK_DB_CONFIG=/release/bedrock.yaml \
|
||||
debian:bookworm-slim /release/bedrock
|
||||
|
||||
release="$revision.${stage##*.}"
|
||||
# Keep the final release private; only switch current after initialization succeeds.
|
||||
python3 - "$stage" "$root" "$release" <<'PY'
|
||||
import os
|
||||
|
||||
Reference in New Issue
Block a user