openvibers/openvibe.host Commits

ov-socketize finds Games' TypeScript entry; all 50 services socket-activated (#216)

OP OpenVibers committed 13 days ago · 1d49760795 · 2 files, +10 −2

Changes

ddiff --git a/docs/no-502.md b/docs/no-502.md
iindex 3afac31..72128c4 100644
---- a/docs/no-502.md
++++ b/docs/no-502.md
@@@ -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
ddiff --git a/scripts/ov-socketize.sh b/scripts/ov-socketize.sh
iindex ba88116..8dd54d8 100755
---- a/scripts/ov-socketize.sh
++++ b/scripts/ov-socketize.sh
@@@ -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