fix(deploy): dynamically resolve nexus container ip for npm registry build arg
Some checks failed
Deploy Canina / deploy (push) Failing after 0s

This commit is contained in:
parsa aghaei 2026-08-15 15:32:21 +03:30
parent 59babf855c
commit 0af3fba2bb

View File

@ -7,7 +7,10 @@ export COMPOSE_DOCKER_CLI_BUILD=1
# Nexus npm registry
NPM_REGISTRY="http://nexus:8081/repository/bitchpedar/"
NEXUS_HOST="nexus"
NEXUS_IP="172.18.0.11"
NEXUS_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{break}}{{end}}' nexus 2>/dev/null || true)
if [ -z "$NEXUS_IP" ]; then
NEXUS_IP="172.18.0.15"
fi
BRANCH="${1:-develop}"
echo "Starting Deployment for branch: ${BRANCH}"