Files
SuperSunday/reset_supersunday.sh
karim hassan f1103d67a0 🚀 Patch auto
2025-08-24 23:00:40 +00:00

35 lines
1.2 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
set -euo pipefail
echo "===> Vérification du répertoire courant"
test -f docker-compose.yml || { echo "❌ docker-compose.yml introuvable ici"; exit 1; }
echo "===> Stop & clean (tous projets 'supersunday*')"
docker ps -a --format '{{.Names}}' | grep -E '^supersunday' || true
docker compose down --remove-orphans || true
echo "===> Kill conteneurs résiduels nommés 'supersunday*'"
for c in $(docker ps -a --format '{{.Names}}' | grep -E '^supersunday' || true); do
docker rm -f "$c" || true
done
echo "===> Ports 80 actuellement à l'écoute:"
sudo lsof -iTCP:80 -sTCP:LISTEN || true
echo "===> Build API (no-cache) + start DB & API"
docker compose build --no-cache api
docker compose up -d db api
echo "===> Statut:"
docker compose ps
echo "===> Logs API (10 dernières lignes):"
docker compose logs --tail=10 api
echo "===> Test santé depuis le conteneur API"
docker compose exec api sh -lc 'apk add --no-cache curl >/dev/null 2>&1 || true; curl -fsS http://localhost:4000/api/health || (echo "<KO>" && exit 1)'
echo "===> Test santé depuis lhôte"
curl -fsS http://localhost/api/health || (echo "<KO host>" && exit 1)
echo "✅ OK: API UP sur http://localhost"