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

52
artery/room/ctrl/start.sh Executable file
View File

@@ -0,0 +1,52 @@
#!/bin/bash
# Start room services
#
# Usage:
# ./start.sh # Start all (foreground)
# ./start.sh -d # Start all (detached)
# ./start.sh --build # Start with rebuild
# ./start.sh <service> # Start specific service
#
# This is a TEMPLATE. Copy to your room's ctrl/ and customize.
set -e
cd "$(dirname "$0")/.."
# Load environment
[ -f ".env" ] && set -a && source .env && set +a
DETACH=""
BUILD=""
TARGET="all"
SERVICE_DIRS=()
# Auto-detect services (dirs with docker-compose.yml)
for dir in */; do
[ -f "$dir/docker-compose.yml" ] && SERVICE_DIRS+=("${dir%/}")
done
for arg in "$@"; do
case $arg in
-d|--detached) DETACH="-d" ;;
--build) BUILD="--build" ;;
*) [[ " ${SERVICE_DIRS[*]} " =~ " ${arg} " ]] && TARGET="$arg" ;;
esac
done
start_service() {
local svc=$1
echo "Starting $svc..."
(cd "$svc" && docker compose up $DETACH $BUILD)
[ -n "$DETACH" ] && echo " $svc started"
}
if [ "$TARGET" = "all" ]; then
for svc in "${SERVICE_DIRS[@]}"; do
start_service "$svc"
done
else
start_service "$TARGET"
fi
[ -n "$DETACH" ] && docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"