openvibers/openvibe.bot Commits

Serve extensionless legal pages and /install; record Sites handoff

OP OpenVibers committed 2 Oct 2026 · efb4f57cd4 · 2 files, +15 −2

Asked: PR https://github.com/OpenVibers/OpenVibe.Bot/pull/2 (branch agent/bot-add-the-production-deploy-files-082918-muqpc7f6), fix round 3. Fix exactly these three review findings, nothing else, then commit on the branch.
Harness job task-Bot-pr-https-github-com-openvibers-openvibe--085106.

Changes

ddiff --git a/README.md b/README.md
iindex 083af10..8b106c8 100644
---- a/README.md
++++ b/README.md
@@@ -8,9 +8,11 @@ Production runs the Node process under systemd as `openvibe-bot.service` (unit r
To run the schema migrations before the service serves, start it once with the direct owner connection in `/etc/openvibe/bot.env` (`DATABASE_DIRECT_URL`); the boot applies `migrations/` and then serves on the pooled `DATABASE_URL`.
++`/install` is proxied to the app; the installer script itself ships with the T15 device-agent job.
++
## Deploy files
- `deploy/systemd/openvibe-bot.service` — systemd unit (`EnvironmentFile=/etc/openvibe/bot.env`, `PORT=4630`, hardening and `Restart=always`).
- `deploy/nginx/openvibe.bot.conf` — nginx reference site for openvibe.bot: TLS, www→apex, rate limits, and WebSocket upgrade headers for the device (`/device`) and operator (`/control`) sockets, passing the `Authorization` header through. It serves the existing Sites page from `/opt/openvibe.sites/dist/openvibe.bot` and shared assets from `/opt/openvibe.sites/dist/_shared`.
--Before installing this vhost, the OpenVibe.Sites owner must stop its catalog and deploy pipeline from generating or replacing `/etc/nginx/sites-available/openvibe.bot.conf`, while continuing to publish the page and shared assets at the paths above. Coordinate the single vhost handoff with that owner; then install this config, validate nginx, and reload it after `openvibe-bot.service` is ready. A later Sites deploy must not overwrite Bot's `/device` and `/control` routes.
++OpenVibe.Sites keeps building the front page, legal pages and `/shared/` assets under `/opt/openvibe.sites/dist/`, but no longer generates `deploy/nginx/openvibe.bot.conf` (sites.json marks the vhost as owned by OpenVibe.Bot). A Sites deploy leaves an installed vhost it no longer generates in place, so the current Sites vhost keeps serving openvibe.bot until Bot's first deploy installs this file over it; nothing has to be removed by hand, and later Sites deploys never overwrite Bot's `/device` and `/control` routes.
ddiff --git a/deploy/nginx/openvibe.bot.conf b/deploy/nginx/openvibe.bot.conf
iindex fa00ce4..9ead063 100644
---- a/deploy/nginx/openvibe.bot.conf
++++ b/deploy/nginx/openvibe.bot.conf
@@@ -112,6 +112,13 @@ server {
proxy_pass http://127.0.0.1:4630;
}
++ # ── Device installer: built and served by the app (server/config.js installer.scriptUrl) ──
++ location = /install {
++ limit_req zone=ovbot_api burst=20 nodelay;
++ limit_req_status 429;
++ proxy_pass http://127.0.0.1:4630;
++ }
++
# ── Health and readiness: host-local probes only ────────
# The app treats /api/health and /api/ready as loopback-only (README); keep them off the public
# vhost so a probe uses port 4630 directly. Exact matches outrank the /api/ prefix below.
@@@ -134,8 +141,12 @@ server {
alias /opt/openvibe.sites/dist/_shared/;
}
++ # proxy_intercept_errors stays off, so this 404 page does not affect proxied responses.
++ error_page 404 /404.html;
++ location = /404.html { internal; }
++
location / {
-- try_files $uri $uri/ =404;
++ try_files $uri $uri.html $uri/ =404;
}
location ~ /\.(?!well-known) {