SPB Git

spb/trouve-ka Public

Trouve-KA — moteur de recherche web indépendant, Québec-first. Crawler distribué, index OpenSearch, ranking bilingue, galerie d'images. En prod : www.trouve-ka.com

Python 76.8% TypeScript 15.7% SQL 3.9% Shell 1.4% CSS 1.3% Dockerfile 0.7%
634 B · 28 lines shellscript
Raw Blame History
1#!/usr/bin/env bash2# Trouve-KA — vérification de santé du stack3# Author: Simon-Pierre Boucher4# Contact: contact@spboucher.ai5set -uo pipefail67API_URL="${API_URL:-http://localhost:8080}"8SEARCH_URL="${SEARCH_URL:-http://localhost:9200}"9WEB_URL="${WEB_URL:-http://localhost:3000}"10FAIL=01112check() {13  local name="$1" url="$2"14  if curl -sf --max-time 5 "$url" > /dev/null; then15    echo "✓ $name ($url)"16  else17    echo "✗ $name ($url)"18    FAIL=119  fi20}2122check "API santé" "$API_URL/api/health"23check "API statut" "$API_URL/api/status"24check "OpenSearch" "$SEARCH_URL/_cluster/health"25check "Web" "$WEB_URL/"2627exit $FAIL28