fix: ajuste de deploy para quantidade de replicas
All checks were successful
BCards Deployment Pipeline / Run Tests (push) Successful in 2s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 7m46s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Has been skipped
BCards Deployment Pipeline / Deploy to Release Swarm (ARM) (push) Successful in 59s
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 0s

This commit is contained in:
Ricardo Carneiro 2025-09-22 12:10:23 -03:00
parent 34503936dd
commit f20f136350
2 changed files with 5 additions and 7 deletions

View File

@ -582,8 +582,8 @@ jobs:
ATTEMPTS=30
while [ $ATTEMPTS -gt 0 ]; do
REPLICAS=$(docker service ls --filter name=bcards-release_bcards-release --format '{{.Replicas}}')
if [ "$REPLICAS" = "2/2" ]; then
echo "✅ Serviço com $REPLICAS réplicas"
if [ "$REPLICAS" = "1/1" ]; then
echo "✅ Serviço com $REPLICAS réplica"
break
fi
echo "Atual: ${REPLICAS:-N/A}; aguardando..."
@ -591,8 +591,8 @@ jobs:
ATTEMPTS=$((ATTEMPTS-1))
done
if [ "$REPLICAS" != "2/2" ]; then
echo "❌ Serviço não atingiu 2/2 réplicas"
if [ "$REPLICAS" != "1/1" ]; then
echo "❌ Serviço não atingiu 1/1 réplica"
docker service ps bcards-release_bcards-release
exit 1
fi

View File

@ -6,9 +6,7 @@ services:
networks:
- bcards-net
deploy:
replicas: 2
placement:
max_replicas_per_node: 1
replicas: 1
update_config:
parallelism: 1
delay: 10s