updated deploy scripts and locations

This commit is contained in:
buenosairesam
2025-12-31 08:21:07 -03:00
parent 9e9e0a5a25
commit fc63e9010c
33 changed files with 160283 additions and 758 deletions

43
artery/room/ctrl/logs.sh Executable file
View File

@@ -0,0 +1,43 @@
#!/bin/bash
# View room service logs
#
# Usage:
# ./logs.sh # All logs
# ./logs.sh <service> # Service compose logs
# ./logs.sh <container> # Specific container logs
# ./logs.sh -f # Follow mode
#
# This is a TEMPLATE. Copy to your room's ctrl/ and customize.
set -e
cd "$(dirname "$0")/.."
FOLLOW=""
TARGET=""
SERVICE_DIRS=()
for dir in */; do
[ -f "$dir/docker-compose.yml" ] && SERVICE_DIRS+=("${dir%/}")
done
for arg in "$@"; do
case $arg in
-f|--follow) FOLLOW="-f" ;;
*) TARGET="$arg" ;;
esac
done
if [ -z "$TARGET" ]; then
# Show all logs
for svc in "${SERVICE_DIRS[@]}"; do
echo "=== $svc ==="
(cd "$svc" && docker compose logs --tail=20 $FOLLOW) || true
done
elif [[ " ${SERVICE_DIRS[*]} " =~ " ${TARGET} " ]]; then
# Service compose logs
(cd "$TARGET" && docker compose logs $FOLLOW)
else
# Specific container
docker logs $FOLLOW "$TARGET"
fi