Create the networks our own pushed templates name, instead of trusting a fresh mirror to have uncommented them

This commit is contained in:
Gmer4Lfe
2026-08-16 20:50:10 -04:00
parent cf67393db6
commit 23825a824d
2 changed files with 96 additions and 0 deletions
+15
View File
@@ -639,6 +639,21 @@ fi
echo ""
echo "━━━ Step 1b — Docker Network (Mirror) ━━━"
# Two halves, and the first is the one that matters for a fresh mirror.
#
# ensure_stack_networks_on_remote reads the networks out of the XMLs this onboard is about to
# push and creates any that are missing on the mirror. It does not consult the mirror's conf,
# because on a fresh node that array is the template default — a single commented-out entry —
# and an empty list is indistinguishable from "no networks needed". The result was every
# container in both stacks created against a network that did not exist.
#
# docker_network_connect.sh still runs afterwards: it is what *connects* the mirror's own
# listed containers to its own listed networks, which is a different job and remains the
# mirror's to declare.
if ! ensure_stack_networks_on_remote "$MIRROR_IP" "$MIRROR_SSH_KEY"; then
warn "One or more stack networks could not be prepared on $MIRROR — deploys below may fail"
fi
_net_script="${SCRIPTS_ROOT}/Docker_Essentials/docker_network_connect.sh"
if [[ "$DRY_RUN" == true ]]; then
warn "DRY RUN — would run docker_network_connect.sh on $MIRROR"