-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun-node.sh
More file actions
executable file
·55 lines (52 loc) · 1.53 KB
/
run-node.sh
File metadata and controls
executable file
·55 lines (52 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# Trinity Node — Quick Launch Script
# Usage: ./run-node.sh [start|stop|status|logs|build]
#
# Starts Trinity Node with Prometheus + Grafana monitoring stack.
# phi^2 + 1/phi^2 = 3 | Trinity Identity
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
COMPOSE_FILE="${SCRIPT_DIR}/docker-compose.node.yml"
case "${1:-start}" in
start)
echo "Starting Trinity Node..."
docker compose -f "$COMPOSE_FILE" up -d
echo ""
echo "Trinity Node started successfully!"
echo " API: http://localhost:8080/health"
echo " Prometheus: http://localhost:9091"
echo " Grafana: http://localhost:3000 (admin/trinity)"
echo ""
echo " Discovery: udp://localhost:9333"
echo " Jobs: tcp://localhost:9334"
;;
stop)
echo "Stopping Trinity Node..."
docker compose -f "$COMPOSE_FILE" down
echo "Trinity Node stopped."
;;
status)
docker compose -f "$COMPOSE_FILE" ps
;;
logs)
docker compose -f "$COMPOSE_FILE" logs -f trinity-node
;;
build)
echo "Building Trinity Node image..."
docker compose -f "$COMPOSE_FILE" build
echo "Build complete."
;;
*)
echo "Trinity Node — Quick Launch Script"
echo ""
echo "Usage: $0 {start|stop|status|logs|build}"
echo ""
echo "Commands:"
echo " start Start the node and monitoring stack (default)"
echo " stop Stop all services"
echo " status Show service status"
echo " logs Follow trinity-node logs"
echo " build Build/rebuild the Docker image"
exit 1
;;
esac