File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,14 +101,14 @@ check_health() {
101101 if $ok && [ " $status " = " 200" ]; then
102102 if [[ " ${HEALTH_STATE[$node]} " == " failing" ]]; then
103103 HEALTH_STATE[$node ]=" ok"
104- local msg=" Health recovered: ${node} .${HEALTH_DOMAIN} "
104+ local msg=" Health recovered: ${node} .${HEALTH_DOMAIN} (from ${HOSTNAME} ) "
105105 echo " $msg "
106106 send_webhook " $msg "
107107 fi
108108 else
109109 if [[ " ${HEALTH_STATE[$node]} " != " failing" ]]; then
110110 HEALTH_STATE[$node ]=" failing"
111- local msg=" Health check FAILED: ${node} .${HEALTH_DOMAIN} (${status:- timeout} )"
111+ local msg=" Health check FAILED: ${node} .${HEALTH_DOMAIN} (${status:- timeout} ) (from ${HOSTNAME} ) "
112112 echo " $msg "
113113 send_webhook " $msg "
114114 else
Original file line number Diff line number Diff line change 11{
22 description = "MoQ publisher dependencies" ;
33
4+ nixConfig = {
5+ extra-substituters = [ "https://kixelated.cachix.org" ] ;
6+ extra-trusted-public-keys = [ "kixelated.cachix.org-1:CmFcV0lyM6KuVM2m9mih0q4SrAa0XyCsiM7GHrz3KKk=" ] ;
7+ } ;
8+
49 inputs = {
5- nixpkgs . url = "github:NixOS/nixpkgs/nixos-unstable" ;
6- moq = {
7- # Pin to a release tag via: just pin
8- url = "github:moq-dev/moq" ;
9- inputs . nixpkgs . follows = "nixpkgs" ;
10- } ;
10+ # Pin to a release tag via: just pin
11+ moq . url = "github:moq-dev/moq" ;
12+ # Don't override nixpkgs — use moq's pin so Cachix cache hits
1113 } ;
1214
1315 outputs =
14- {
15- nixpkgs ,
16- moq ,
17- ...
18- } :
16+ { moq , ... } :
1917 {
2018 packages . x86_64-linux =
2119 let
2220 system = "x86_64-linux" ;
23- pkgs = nixpkgs . legacyPackages . ${ system } ;
21+ pkgs = moq . inputs . nixpkgs . legacyPackages . ${ system } ;
2422 in
2523 {
2624 default = pkgs . symlinkJoin {
Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ pin tag="":
1515 exit 1
1616 fi
1717 echo " Pinning to $TAG..."
18- nix flake update
19- nix flake lock --override-input moq " github:moq-dev/moq/$TAG"
18+ nix flake lock --override-input moq " github:moq-dev/moq/$TAG" --update-input moq
2019
2120# Get the hostname for the publisher
2221host :
7271 HOST=$(just host)
7372 ssh root@$HOST
7473
74+ restart :
75+ #!/usr/bin/env bash
76+ HOST=$(just host)
77+ echo " === $HOST ==="
78+ ssh root@$HOST " systemctl restart demo-bbb --no-pager"
79+
7580# View logs from publisher
7681logs :
7782 #!/usr/bin/env bash
Original file line number Diff line number Diff line change @@ -89,6 +89,11 @@ logs node:
8989 #!/usr/bin/env bash
9090 ssh root@$(just host {{node}}) " journalctl -u moq-relay -f"
9191
92+ # Restart
93+ restart node :
94+ #!/usr/bin/env bash
95+ ssh root@$(just host {{node}}) " systemctl restart moq-relay --no-pager"
96+
9297# Profile moq-relay on a node using perf (built via nix)
9398perf node * args :
9499 #!/usr/bin/env bash
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ start rom url='http://localhost:4443/anon':
5555
5656# Host the web server
5757web url ='http : //localhost :4443/anon ':
58- VITE_RELAY_URL=" {{ url}} " bun run --filter @moq / boy dev --open
58+ VITE_RELAY_URL=" {{ url}} " bun vite --open
5959
6060# --- rom.moq.dev (R2 hosting) ---
6161
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ cluster:
1515 " just wait && just leaf1" \
1616 " just wait && just pub bbb http://localhost:4444/demo?jwt=$(cat demo-cli.jwt)" \
1717 " just wait && just pub tos http://localhost:4443/demo?jwt=$(cat demo-cli.jwt)" \
18- " just wait && env VITE_RELAY_URL=http://localhost:4445/demo?jwt=$(cat demo-web.jwt) bun run --filter @moq/demo dev "
18+ " just wait && VITE_RELAY_URL=http://localhost:4445/demo?jwt=$(cat demo-web.jwt) bun --cwd ../web vite "
1919
2020# Run a localhost root server, accepting connections from leaf nodes.
2121root : auth-key
Original file line number Diff line number Diff line change 66
77# Run the web server targeting the specified relay.
88serve url ='http : //localhost :4443/anon ':
9- VITE_RELAY_URL=" {{ url}} " bun run --filter @moq / demo dev
9+ VITE_RELAY_URL=" {{ url}} " bun vite
Original file line number Diff line number Diff line change 44
55
66mod dev
7+ mod cdn
78
89# Shortcuts to avoid `dev::` prefix.
910mod boy ' dev/boy'
You can’t perform that action at this time.
0 commit comments