Add subspace-tv FastAPI service with Unraid deployment

Includes FastAPI application with device authentication, Docker configuration,
Bruno API tests, and git-based deployment scripts for Unraid.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Michael Simard
2026-01-22 09:22:32 -06:00
parent 171d55bd4e
commit 57ad4b0f33
21 changed files with 904 additions and 0 deletions

59
manage.sh Executable file
View File

@@ -0,0 +1,59 @@
#!/bin/bash
# Configuration
UNRAID_HOST="root@192.168.2.61"
REMOTE_PATH="/boot/config/plugins/compose.manager/projects/subspace-tv"
usage() {
echo "Usage: $0 <command>"
echo ""
echo "Commands:"
echo " logs - View live container logs"
echo " status - Show container status"
echo " restart - Restart container"
echo " stop - Stop container"
echo " start - Start container"
echo " rebuild - Full rebuild and restart"
echo " shell - SSH to Unraid at project directory"
exit 1
}
remote_cmd() {
ssh "$UNRAID_HOST" "cd $REMOTE_PATH && $1"
}
case "$1" in
logs)
ssh -t "$UNRAID_HOST" "cd $REMOTE_PATH && docker compose logs -f"
;;
status)
echo "=== Container Status ==="
remote_cmd "docker compose ps"
;;
restart)
echo "Restarting container..."
remote_cmd "docker compose restart"
echo "Done"
;;
stop)
echo "Stopping container..."
remote_cmd "docker compose down"
echo "Done"
;;
start)
echo "Starting container..."
remote_cmd "docker compose up -d"
echo "Done"
;;
rebuild)
echo "Rebuilding container..."
remote_cmd "docker compose down && docker compose up -d --build"
echo "Done"
;;
shell)
ssh -t "$UNRAID_HOST" "cd $REMOTE_PATH && bash"
;;
*)
usage
;;
esac