Add Docker deployment for Unraid
- Dockerfile with nginx:alpine for static file serving - docker-compose.yml with port 9113:80 mapping - deploy.sh for git-based deployment to Unraid - setup-unraid.sh for initial server configuration - manage.sh for container operations (logs, status, restart, etc.) - .gitignore to exclude config.js Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
52
manage.sh
Executable file
52
manage.sh
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
# manage.sh - Manage unraid-dash on Unraid
|
||||
|
||||
UNRAID_HOST="${UNRAID_HOST:-root@192.168.2.61}"
|
||||
REMOTE_PATH="/boot/config/plugins/compose.manager/projects/unraid-dash"
|
||||
|
||||
CMD="$1"
|
||||
|
||||
run_remote() {
|
||||
ssh ${UNRAID_HOST} "cd ${REMOTE_PATH} && $1"
|
||||
}
|
||||
|
||||
case "$CMD" in
|
||||
logs)
|
||||
run_remote "docker compose logs -f"
|
||||
;;
|
||||
status)
|
||||
run_remote "docker compose ps"
|
||||
;;
|
||||
restart)
|
||||
run_remote "docker compose restart"
|
||||
echo "Dashboard restarted"
|
||||
;;
|
||||
stop)
|
||||
run_remote "docker compose down"
|
||||
echo "Dashboard stopped"
|
||||
;;
|
||||
start)
|
||||
run_remote "docker compose up -d"
|
||||
echo "Dashboard started"
|
||||
;;
|
||||
rebuild)
|
||||
run_remote "docker compose up -d --build"
|
||||
echo "Dashboard rebuilt and started"
|
||||
;;
|
||||
shell)
|
||||
ssh -t ${UNRAID_HOST} "cd ${REMOTE_PATH} && bash"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {logs|status|restart|stop|start|rebuild|shell}"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " logs - View live logs"
|
||||
echo " status - Show container status"
|
||||
echo " restart - Restart the dashboard"
|
||||
echo " stop - Stop the dashboard"
|
||||
echo " start - Start the dashboard"
|
||||
echo " rebuild - Rebuild and restart the dashboard"
|
||||
echo " shell - SSH into Unraid at dashboard directory"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user