mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 13:17:19 +01:00
Remove dev server readiness check from setup script
The 60-second polling loop that waits for the dev server to respond adds unnecessary setup time. The warmup step that follows already has a timeout, so we can proceed directly to it.
This commit is contained in:
parent
fa0a665ab7
commit
e72f6ef268
1 changed files with 1 additions and 20 deletions
|
|
@ -192,26 +192,7 @@ pnpm run dev >> "$LOG_FILE" 2>&1 &
|
|||
SERVER_PID=$!
|
||||
log "✓ Dev server started with PID $SERVER_PID"
|
||||
|
||||
# 7. Wait for dev server to be ready
|
||||
log "Waiting for dev server to be ready (this may take 30-60 seconds on first run)..."
|
||||
MAX_ATTEMPTS=60
|
||||
ATTEMPT=0
|
||||
while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
|
||||
if curl -s -o /dev/null -w "%{http_code}" http://localhost:3001/api/heartbeat 2>/dev/null | grep -q "200"; then
|
||||
log "✓ Dev server is ready and responding"
|
||||
break
|
||||
fi
|
||||
ATTEMPT=$((ATTEMPT + 1))
|
||||
if [ $ATTEMPT -eq $MAX_ATTEMPTS ]; then
|
||||
log_error "Dev server failed to start within 60 seconds"
|
||||
log_error "Check the log file for details: $LOG_FILE"
|
||||
kill $SERVER_PID 2>/dev/null || true
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# 8. Warm up the main application routes
|
||||
# 7. Warm up the main application routes
|
||||
log "Warming up main application routes..."
|
||||
if curl -s -o /dev/null --max-time 30 http://localhost:3001/ 2>/dev/null; then
|
||||
log "✓ Main routes pre-compiled"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue