fix(ci): introduce dynamic static subnet mapping to bypass Docker automatic address pool allocation limits
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 50s
Build & Deploy / 🧪 QA (push) Successful in 1m46s
Build & Deploy / 🏗️ Build (push) Successful in 3m21s
Build & Deploy / 🚀 Deploy (push) Failing after 31s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s

This commit is contained in:
2026-05-28 23:07:09 +02:00
parent 4aebd226f1
commit cf29d0c45a
2 changed files with 17 additions and 0 deletions

View File

@@ -306,6 +306,19 @@ jobs:
GATEKEEPER_ORIGIN="${NEXT_PUBLIC_BASE_URL}/gatekeeper"
if [[ "$TARGET" == "production" ]]; then
INTERNAL_SUBNET="172.28.10.0/24"
elif [[ "$TARGET" == "testing" ]]; then
INTERNAL_SUBNET="172.28.11.0/24"
elif [[ "$TARGET" == "staging" ]]; then
INTERNAL_SUBNET="172.28.12.0/24"
else
HEX_SHA="${{ needs.prepare.outputs.short_sha }}"
DEC_SHA=$((16#$HEX_SHA))
SUBNET_NUM=$(( 13 + (DEC_SHA % 230) ))
INTERNAL_SUBNET="172.28.${SUBNET_NUM}.0/24"
fi
{
echo "# Generated by CI - $TARGET"
echo "IMAGE_TAG=$IMAGE_TAG"
@@ -342,6 +355,7 @@ jobs:
echo "COMPOSE_PROFILES=$COMPOSE_PROFILES"
echo "AUTH_MIDDLEWARE=$AUTH_MIDDLEWARE"
echo "AUTH_MIDDLEWARE_UNPROTECTED=$AUTH_MIDDLEWARE_UNPROTECTED"
echo "INTERNAL_SUBNET=$INTERNAL_SUBNET"
} > .env.deploy
- name: 🚀 SSH Deploy

View File

@@ -110,6 +110,9 @@ services:
networks:
default:
name: ${PROJECT_NAME:-e-tib}-internal
ipam:
config:
- subnet: ${INTERNAL_SUBNET:-172.28.9.0/24}
infra:
external: true