unify all ports: app=3010, infra=3184-3187, cleanup debug markers

This commit is contained in:
Дмитрий Мамедов
2026-06-10 18:12:26 +03:00
parent d33cb237d7
commit 9b4311f34f
7 changed files with 15 additions and 32 deletions

View File

@@ -258,14 +258,11 @@ while [ "$I" -le 30 ]; do
break
fi
if [ "$I" -eq 30 ]; then
echo "=== PG LOOP TIMEOUT ==="
warn "PostgreSQL did not become ready after 60s — continuing anyway..."
fi
I=$((I + 1))
sleep 2
done
echo "=== AFTER PG LOOP ==="
echo "=== CHECKPOINT: after postgres loop ==="
info "Waiting for Redis..."
for ((i=1; i<=15; i++)); do
@@ -278,41 +275,27 @@ for ((i=1; i<=15; i++)); do
fi
sleep 2
done
echo "=== CHECKPOINT: after redis loop ==="
# ─── 6. Dependencies & Prisma ────────────────────────────────────
echo "=== CHECKPOINT: step 6 ==="
step "6/8 Installing dependencies"
echo "=== CHECKPOINT: npm install ==="
npm install --no-audit --no-fund || error "'npm install' failed. Check network / ${INSTALL_DIR}/package.json"
echo "=== CHECKPOINT: npm ci done ==="
info "npm dependencies installed"
echo "=== CHECKPOINT: prisma generate ==="
npx prisma generate || error "'prisma generate' failed."
echo "=== CHECKPOINT: prisma generate done ==="
info "Prisma client generated"
export DATABASE_URL
echo "=== CHECKPOINT: prisma db push ==="
npx prisma db push || error "'prisma db push' failed. Is PostgreSQL accessible? Check ${INSTALL_DIR}/.env DATABASE_URL"
echo "=== CHECKPOINT: prisma db push done ==="
info "Database schema applied"
# ─── 7. Seed ─────────────────────────────────────────────────────
echo "=== CHECKPOINT: step 7 ==="
step "7/8 Seeding database"
echo "=== CHECKPOINT: seed ==="
npx ts-node -P tsconfig.json prisma/seed.ts || error "Seed failed."
echo "=== CHECKPOINT: seed done ==="
info "Seed data created"
# ─── 8. Build & Start ────────────────────────────────────────────
echo "=== CHECKPOINT: step 8 ==="
step "8/8 Building and starting SSO Service"
echo "=== CHECKPOINT: build ==="
npm run build || error "'npm run build' failed. Check TypeScript errors above."
echo "=== CHECKPOINT: build done ==="
info "Application built"
# Остановить предыдущий процесс, если был