Restore scratch setup bootstrap and live frontdoor sweep

This commit is contained in:
master
2026-03-09 01:42:24 +02:00
parent abda749ffd
commit c9686edf07
13 changed files with 766 additions and 63 deletions

View File

@@ -190,6 +190,44 @@ ensure_env() {
fi
}
get_compose_env_value() {
local key="$1"
local env_file="${COMPOSE_DIR}/.env"
[[ -f "$env_file" ]] || return 1
awk -F= -v key="$key" '$1 == key { print substr($0, index($0, "=") + 1); exit }' "$env_file"
}
get_frontdoor_network_name() {
if [[ -n "${FRONTDOOR_NETWORK:-}" ]]; then
printf '%s\n' "$FRONTDOOR_NETWORK"
return
fi
local configured
configured="$(get_compose_env_value FRONTDOOR_NETWORK || true)"
if [[ -n "$configured" ]]; then
printf '%s\n' "$configured"
return
fi
printf '%s\n' 'stellaops_frontdoor'
}
ensure_frontdoor_network() {
local network_name
network_name="$(get_frontdoor_network_name)"
if docker network inspect "$network_name" >/dev/null 2>&1; then
ok "Frontdoor network available ($network_name)"
return
fi
warn "Frontdoor network missing ($network_name); creating it now."
docker network create "$network_name" >/dev/null
ok "Created frontdoor network ($network_name)"
}
# ─── 4. Start infrastructure ───────────────────────────────────────────────
start_infra() {
@@ -259,6 +297,7 @@ build_images() {
start_platform() {
step 'Starting full Stella Ops platform'
ensure_frontdoor_network
cd "$COMPOSE_DIR"
docker compose -f docker-compose.stella-ops.yml up -d
ok 'Platform services started'