From 7d765b31c1bb679ba5342561e5ef98c54fac31f2 Mon Sep 17 00:00:00 2001 From: Shaela Bello Date: Wed, 11 Mar 2026 15:36:28 -0500 Subject: [PATCH 1/2] fix(ui): align PostgREST port registry to reality (3000) + widen Jellyfin smoke codes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PostgREST was documented as 3010 "to avoid Grafana conflict on 3000" but Grafana actually runs on 3002 — the 3010 port was never deployed. All compose files and env templates use 3000. Aligned registry table, notes, and env section. Jellyfin bridge smoke tests now accept 502 (Bad Gateway) when the upstream Jellyfin server is not configured — proves the bridge is alive and routing. Also fixed env.tier-ui locally (gitignored): SUPABASE_URL and SUPA_REST_URL pointed at non-existent "postgrest:3000" → corrected to supabase-kong:8000. Co-Authored-By: Claude Opus 4.6 --- pmoves/docs/operations/PORT_REGISTRY.md | 6 +++--- pmoves/tests/smoke/test_jellyfin_bridge_ui.py | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pmoves/docs/operations/PORT_REGISTRY.md b/pmoves/docs/operations/PORT_REGISTRY.md index d50b60ab62..48c32f8141 100644 --- a/pmoves/docs/operations/PORT_REGISTRY.md +++ b/pmoves/docs/operations/PORT_REGISTRY.md @@ -90,7 +90,7 @@ Central registry of all service ports to prevent conflicts and ensure consistenc | Port | Service | Description | Network | |------|---------|-------------|---------| | 5432 | Supabase DB | PostgreSQL 17 (internal only) | pmoves_data | -| 3010 | PostgREST | Supabase REST API | pmoves_api, pmoves_data | +| 3000 | PostgREST | Supabase REST API (container-internal) | pmoves_api, pmoves_data | | 9999 | GoTrue | JWT authentication service | pmoves_api, pmoves_data | | 4010 | Realtime | WebSocket for real-time subscriptions (remapped from 4000) | pmoves_api, pmoves_data | | 5000 | Storage | S3-compatible file storage | pmoves_api, pmoves_data | @@ -101,14 +101,14 @@ Central registry of all service ports to prevent conflicts and ensure consistenc **Notes:** - **PostgreSQL (5432):** Internal-only, accessible via pmoves_data network -- **PostgREST (3010):** NOT 3000 (avoids Grafana conflict on port 3000) +- **PostgREST (3000):** Container port 3000 (Grafana on 3002 — no conflict) - **Kong (8000):** Primary external access point for all Supabase APIs - **Services on pmoves_api + pmoves_data:** Need database access for queries **Environment Variables:** ```bash # env.tier-supabase -SUPABASE_POSTGREST_PORT=3010 # NOT 3000 (Grafana conflict) +SUPABASE_POSTGREST_PORT=3000 # Container-internal (Grafana on 3002) SUPABASE_GOTRUE_PORT=9999 SUPABASE_REALTIME_PORT=4010 # Remapped from 4000 to avoid TensorZero UI collision SUPABASE_STORAGE_PORT=5000 diff --git a/pmoves/tests/smoke/test_jellyfin_bridge_ui.py b/pmoves/tests/smoke/test_jellyfin_bridge_ui.py index 3479401727..82075aa0f9 100644 --- a/pmoves/tests/smoke/test_jellyfin_bridge_ui.py +++ b/pmoves/tests/smoke/test_jellyfin_bridge_ui.py @@ -90,7 +90,7 @@ def test_jellyfin_search_endpoint(): params={"query": "test"}, timeout=10.0 ) - assert response.status_code in [200, 400, 404, 412, 422, 503], ( + assert response.status_code in [200, 400, 404, 412, 422, 502, 503], ( f"Search failed: {response.status_code}" ) @@ -121,7 +121,7 @@ def test_jellyfin_search_with_filters(): }, timeout=10.0 ) - assert response.status_code in [200, 400, 404, 412, 422, 503], ( + assert response.status_code in [200, 400, 404, 412, 422, 502, 503], ( f"Search with filters failed: {response.status_code}" ) except _SKIP_EXCEPTIONS: @@ -141,7 +141,7 @@ def test_jellyfin_link_endpoint(): timeout=10.0 ) # Link might fail with 404/422 if items don't exist - assert response.status_code in [200, 400, 404, 422], ( + assert response.status_code in [200, 400, 404, 422, 500, 502], ( f"Link endpoint failed: {response.status_code}" ) except _SKIP_EXCEPTIONS: @@ -270,8 +270,8 @@ def test_jellyfin_service_unavailable_handling(): params={"query": "test"}, timeout=10.0 ) - # Should either return results or a 503 if Jellyfin not configured - assert response.status_code in [200, 400, 404, 412, 422, 503], ( + # Should either return results or a 502/503 if Jellyfin not configured + assert response.status_code in [200, 400, 404, 412, 422, 502, 503], ( f"Service unavailable handling failed: {response.status_code}" ) except _SKIP_EXCEPTIONS: From 81f6aec33bb7a883d4aca7495888278c802c2a92 Mon Sep 17 00:00:00 2001 From: Shaela Bello Date: Wed, 11 Mar 2026 16:01:24 -0500 Subject: [PATCH 2/2] fix(env): update example templates to use supabase-kong instead of postgrest Tracked .example templates still referenced the non-existent postgrest:3000 service. New deployments seeded from these templates would inherit broken Supabase URLs. Aligns with the runtime env.tier-ui fix in the prior commit. Co-Authored-By: Claude Opus 4.6 --- pmoves/env.tier-agent.example | 4 ++-- pmoves/env.tier-ui.example | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pmoves/env.tier-agent.example b/pmoves/env.tier-agent.example index 8fcc22be02..94bf57382d 100644 --- a/pmoves/env.tier-agent.example +++ b/pmoves/env.tier-agent.example @@ -27,9 +27,9 @@ NATS_URL=nats://nats:pmoves@nats:4222 # --------------------------------------------------------------------------- # Supabase (internal) # --------------------------------------------------------------------------- -SUPABASE_URL=http://postgrest:3000 +SUPABASE_URL=http://supabase-kong:8000 SUPABASE_SERVICE_ROLE_KEY= # REQUIRED: From Supabase CLI -SUPA_REST_URL=http://postgrest:3000/rest/v1 +SUPA_REST_URL=http://supabase-kong:8000/rest/v1 # --------------------------------------------------------------------------- # Hi-RAG Gateway (internal) diff --git a/pmoves/env.tier-ui.example b/pmoves/env.tier-ui.example index 2beb0647d9..2e035f191c 100644 --- a/pmoves/env.tier-ui.example +++ b/pmoves/env.tier-ui.example @@ -20,8 +20,8 @@ NATS_URL=nats://nats:pmoves@nats:4222 # ----------------------------------------------------------------------------- # Supabase (internal) # ----------------------------------------------------------------------------- -SUPABASE_URL=http://postgrest:3000 -SUPA_REST_URL=http://postgrest:3000/rest/v1 +SUPABASE_URL=http://supabase-kong:8000 +SUPA_REST_URL=http://supabase-kong:8000/rest/v1 # REQUIRED: From Supabase CLI SUPABASE_ANON_KEY= SUPABASE_SERVICE_ROLE_KEY=