openvibers/openvibe.host Commits
ov-socketize finds Games' TypeScript entry; all 50 services socket-activated (#216)
Changes
@@@ -29,6 +29,10 @@ service over:`ovhost validate` warns about any service that has a port but no socket unit.++**Status, 2026-10-31 01:3x UTC:** all 50 services are socket-activated (`ovhost status`: 0 without an active socket).++Every one passed the restart proof. The script finds the server's entry in `current/server/index.js` (release++layout), `server/index.js` (checkout), or `apps/server/src/main.ts` (Games, run through tsx).++## 2. If a site is down anyway: our page, not Cloudflare's`deploy/nginx/snippets/ov-down.conf` turns nginx's own 502 and 504 (the upstream refused the connection or timed@@@ -20,8 +20,12 @@ console.log([s.units[0], s.port, s.repo, (s.ready && s.ready.url) || ""].join("[ -n "$port" ] && [ "$port" != "undefined" ] || { echo "$svc: no port in host.json"; exit 2; }base=${unit%.service}sock=$base.socket--code="$repo/server/index.js"; [ -L "$repo/current" ] && code="$repo/current/server/index.js"--grep -q 'socketActivated' "$code" || { echo "$svc: $code does not listen on fd 3 yet (deploy the socket-activation PR first)"; exit 3; }++# The server's entry: a release layout's current/, a plain checkout, or Games' TypeScript server.++code=""++for f in "$repo/current/server/index.js" "$repo/server/index.js" "$repo/apps/server/src/main.ts"; do++ [ -f "$f" ] && { code=$f; break; }++done++[ -n "$code" ] && grep -q 'socketActivated' "$code" || { echo "$svc: ${code:-its server entry} does not listen on fd 3 yet (deploy the socket-activation PR first)"; exit 3; }if [ "$(node -e 'const s=require(process.argv[1]).services[process.argv[2]];console.log(s.socketUnit||"")' "$HJ" "$svc")" = "$sock" ] && \ss -ltnp "sport = :$port" | grep -q 'systemd'; then echo "$svc: already socket-activated ($sock holds :$port)"; exit 0; fi
@@ -29,6 +29,10 @@ service over:
@@ -29,6 +29,10 @@ service over:
`ovhost validate` warns about any service that has a port but no socket unit.
`ovhost validate` warns about any service that has a port but no socket unit.
+**Status, 2026-10-31 01:3x UTC:** all 50 services are socket-activated (`ovhost status`: 0 without an active socket).
+Every one passed the restart proof. The script finds the server's entry in `current/server/index.js` (release
+layout), `server/index.js` (checkout), or `apps/server/src/main.ts` (Games, run through tsx).
+
## 2. If a site is down anyway: our page, not Cloudflare's
## 2. If a site is down anyway: our page, not Cloudflare's
`deploy/nginx/snippets/ov-down.conf` turns nginx's own 502 and 504 (the upstream refused the connection or timed
`deploy/nginx/snippets/ov-down.conf` turns nginx's own 502 and 504 (the upstream refused the connection or timed
@@ -20,8 +20,12 @@ console.log([s.units[0], s.port, s.repo, (s.ready && s.ready.url) || ""].join("
@@ -20,8 +20,12 @@ console.log([s.units[0], s.port, s.repo, (s.ready && s.ready.url) || ""].join("
[ -n "$port" ] && [ "$port" != "undefined" ] || { echo "$svc: no port in host.json"; exit 2; }
[ -n "$port" ] && [ "$port" != "undefined" ] || { echo "$svc: no port in host.json"; exit 2; }
base=${unit%.service}
base=${unit%.service}
sock=$base.socket
sock=$base.socket
-code="$repo/server/index.js"; [ -L "$repo/current" ] && code="$repo/current/server/index.js"
-grep -q 'socketActivated' "$code" || { echo "$svc: $code does not listen on fd 3 yet (deploy the socket-activation PR first)"; exit 3; }
+# The server's entry: a release layout's current/, a plain checkout, or Games' TypeScript server.
+code=""
+for f in "$repo/current/server/index.js" "$repo/server/index.js" "$repo/apps/server/src/main.ts"; do
+ [ -f "$f" ] && { code=$f; break; }
+done
+[ -n "$code" ] && grep -q 'socketActivated' "$code" || { echo "$svc: ${code:-its server entry} does not listen on fd 3 yet (deploy the socket-activation PR first)"; exit 3; }
if [ "$(node -e 'const s=require(process.argv[1]).services[process.argv[2]];console.log(s.socketUnit||"")' "$HJ" "$svc")" = "$sock" ] && \
if [ "$(node -e 'const s=require(process.argv[1]).services[process.argv[2]];console.log(s.socketUnit||"")' "$HJ" "$svc")" = "$sock" ] && \
ss -ltnp "sport = :$port" | grep -q 'systemd'; then echo "$svc: already socket-activated ($sock holds :$port)"; exit 0; fi
ss -ltnp "sport = :$port" | grep -q 'systemd'; then echo "$svc: already socket-activated ($sock holds :$port)"; exit 0; fi