diff --git a/.github/workflows/ci-cd-web-desktop.yml b/.github/workflows/ci-cd-web-desktop.yml index 208661e..886d0b9 100644 --- a/.github/workflows/ci-cd-web-desktop.yml +++ b/.github/workflows/ci-cd-web-desktop.yml @@ -296,31 +296,9 @@ jobs: echo "Using APP_DIR (stable)=$APP_DIR_STABLE" APP_DIR="$APP_DIR_STABLE" RELEASE_SHA=${{ github.sha }} docker stack deploy --with-registry-auth -c stack.yml sistema - - name: Ensure Convex service envs (sem force restart) - run: | - cd "$EFFECTIVE_APP_DIR" - set -o allexport - if [ -f .env ]; then . ./.env; fi - set +o allexport - echo "Ensuring Convex envs on service: sistema_convex_backend" - # Acumula todas as env vars em um único update para evitar múltiplos restarts - UPDATE_ARGS="" - if [ -n "${MACHINE_PROVISIONING_SECRET:-}" ]; then - UPDATE_ARGS="$UPDATE_ARGS --env-add MACHINE_PROVISIONING_SECRET=${MACHINE_PROVISIONING_SECRET}" - fi - if [ -n "${MACHINE_TOKEN_TTL_MS:-}" ]; then - UPDATE_ARGS="$UPDATE_ARGS --env-add MACHINE_TOKEN_TTL_MS=${MACHINE_TOKEN_TTL_MS}" - fi - if [ -n "${FLEET_SYNC_SECRET:-}" ]; then - UPDATE_ARGS="$UPDATE_ARGS --env-add FLEET_SYNC_SECRET=${FLEET_SYNC_SECRET}" - fi - if [ -n "$UPDATE_ARGS" ]; then - echo "Applying env updates (will respect update_config.order: start-first)..." - docker service update $UPDATE_ARGS sistema_convex_backend || true - fi - echo "Current envs:" - docker service inspect sistema_convex_backend --format '{{range .Spec.TaskTemplate.ContainerSpec.Env}}{{println .}}{{end}}' || true - # NÃO fazemos --force aqui para respeitar a estratégia start-first do stack.yml + # Removido: "Ensure Convex service envs" - as env vars já são passadas pelo stack.yml + # via substituição de variáveis do .env. Fazer docker service update aqui causava + # um rolling update adicional desnecessário com ~60s de downtime. - name: Smoke test — register + heartbeat run: |