BankliPlus/temparea/solarbank/monitor-deployment.sh
2025-08-13 18:05:26 +02:00

42 lines
1.4 KiB
Bash

#!/bin/bash
# Real-time deployment monitoring script
echo "======================================"
echo "SolarBank Deployment Monitor"
echo "======================================"
cd /opt/solarbank 2>/dev/null || { echo "Deployment not started yet..."; exit 1; }
while true; do
clear
echo "======================================"
echo "SolarBank Deployment Status"
echo "Time: $(date)"
echo "======================================"
# Check Docker services
echo -e "\nDocker Services:"
docker-compose -f docker-compose.prod.yml ps 2>/dev/null || docker-compose -f docker-compose.prod.nossl.yml ps 2>/dev/null || echo "Services not started yet..."
# Check endpoints
echo -e "\nService Health:"
if curl -s -o /dev/null -w "%{http_code}" http://localhost/api/health 2>/dev/null | grep -q "200"; then
echo "✅ Backend API: RUNNING"
else
echo "⏳ Backend API: Starting..."
fi
if curl -s -o /dev/null -w "%{http_code}" http://localhost/ 2>/dev/null | grep -q "200"; then
echo "✅ Frontend: RUNNING"
else
echo "⏳ Frontend: Starting..."
fi
echo -e "\nAccess URLs:"
echo "Frontend: http://172.104.237.108"
echo "API: http://172.104.237.108/api"
echo "API Docs: http://172.104.237.108/api/docs"
echo -e "\nPress Ctrl+C to exit monitoring"
sleep 5
done