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:
59
manage.sh
Executable file
59
manage.sh
Executable 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
|
||||
Reference in New Issue
Block a user