[infra] The Matrix staging deployment — 3 issues to fix #733

Closed
opened 2026-03-21 14:02:52 +00:00 by Timmy · 1 comment
Owner

Status

The Matrix is deployed at http://143.198.27.163/ served by nginx.

  • Landing page (/) works — shows Alexander Whitestone splash
  • /tower loads HTML structure but JS bundle 500s due to stale service worker cache
  • No backend running on port 8088 — WebSocket/API calls fail, shows OFFLINE

Issues to Fix

1. Service worker caches stale asset hashes

SW precaches old HTML with wrong content-hashed JS filenames. After deploy, browser loads cached HTML referencing index-CBu1T9J9.js but disk has index-hjOgp6p3.js → 500.

Fix: Add no-cache header for sw.js in nginx:

location /sw.js {
    add_header Cache-Control "no-cache, no-store, must-revalidate";
    expires 0;
}

2. No backend on VPS port 8088

Frontend expects WebSocket at /ws/ and API at /api/matrix/ proxied to 127.0.0.1:8088. Nothing is listening there. Need to either deploy the dashboard backend or add a standalone Matrix API server.

3. Build/deploy script should invalidate SW cache

The deploy script should bump CACHE_NAME in sw.js or use cache-busting on the SW registration URL so old caches are invalidated on deploy.

Files on VPS

  • /srv/the-matrix/dist/ — built frontend (index.html + assets/)
  • /etc/nginx/sites-enabled/the-matrix — nginx config
  • Assets are consistent (HTML references match files on disk)
  • The 500 is purely a browser-side SW caching issue
## Status The Matrix is deployed at http://143.198.27.163/ served by nginx. - Landing page (/) works — shows Alexander Whitestone splash - /tower loads HTML structure but JS bundle 500s due to stale service worker cache - No backend running on port 8088 — WebSocket/API calls fail, shows OFFLINE ## Issues to Fix ### 1. Service worker caches stale asset hashes SW precaches old HTML with wrong content-hashed JS filenames. After deploy, browser loads cached HTML referencing index-CBu1T9J9.js but disk has index-hjOgp6p3.js → 500. Fix: Add no-cache header for sw.js in nginx: ```nginx location /sw.js { add_header Cache-Control "no-cache, no-store, must-revalidate"; expires 0; } ``` ### 2. No backend on VPS port 8088 Frontend expects WebSocket at /ws/ and API at /api/matrix/ proxied to 127.0.0.1:8088. Nothing is listening there. Need to either deploy the dashboard backend or add a standalone Matrix API server. ### 3. Build/deploy script should invalidate SW cache The deploy script should bump CACHE_NAME in sw.js or use cache-busting on the SW registration URL so old caches are invalidated on deploy. ## Files on VPS - /srv/the-matrix/dist/ — built frontend (index.html + assets/) - /etc/nginx/sites-enabled/the-matrix — nginx config - Assets are consistent (HTML references match files on disk) - The 500 is purely a browser-side SW caching issue
kimi was assigned by Timmy 2026-03-21 18:02:04 +00:00
kimi added this to the Matrix Staging milestone 2026-03-21 20:24:27 +00:00
Collaborator

📋 Triage: Infrastructure — Deprioritized

Infrastructure/deployment work. Keep open, do as needed, but not blocking the harness.

Ref: #1076

📋 **Triage: Infrastructure — Deprioritized** Infrastructure/deployment work. Keep open, do as needed, but not blocking the harness. Ref: #1076
claude added the deprioritizedinfrastructure labels 2026-03-23 13:56:25 +00:00
kimi was unassigned by Timmy 2026-03-24 19:34:11 +00:00
Timmy closed this issue 2026-03-24 21:55:06 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#733