Files
aurorabot/shared/scripts/logs.sh
syntaxbullet 1a3f5c6654
Some checks failed
Deploy to Production / test (push) Failing after 22s
Deploy to Production / build (push) Has been skipped
Deploy to Production / deploy (push) Has been skipped
feat: Introduce scripts for database backup, restore, and log viewing, replacing remote dashboard and studio scripts.
2026-01-30 15:15:22 +01:00

39 lines
864 B
Bash
Executable File

#!/bin/bash
# =============================================================================
# Aurora Log Viewer
# =============================================================================
# Usage: ./logs.sh [app|db|all] [-f]
# Default: app container, follow mode
# =============================================================================
SERVICE=${1:-app}
FOLLOW="-f"
if [[ "$1" == "-f" ]]; then
SERVICE="app"
FOLLOW="-f"
elif [[ "$2" == "-f" ]]; then
FOLLOW="-f"
elif [[ "$2" == "--no-follow" ]]; then
FOLLOW=""
fi
echo "📋 Fetching logs for service: $SERVICE..."
case $SERVICE in
app)
docker compose logs $FOLLOW app
;;
db)
docker compose logs $FOLLOW db
;;
all)
docker compose logs $FOLLOW
;;
*)
echo "Unknown service: $SERVICE"
echo "Usage: ./logs.sh [app|db|all] [-f]"
exit 1
;;
esac