Files
Georgy ButaevandClaude Opus 4.8 054204e943 chore(infra): retire managed Supabase cloud; Hetzner self-host is SSOT
The managed Supabase Cloud project (ohkueislstxomdjavyhs) is retired; the
self-hosted instance at supabase.orangecat.ch on the Hetzner box is the single
source of truth. Repoint the image host + setup scripts, rewrite the agent/dev
guidance to use the self-host directly (not the Supabase MCP, which only reaches
the retired cloud), update active docs, exit retired cloud-Management-API
scripts behind a RETIRED guard, env-ify direct-connect scripts, gitignore
.env-backups, and add a founder-run DECOMMISSION-CLOUD runbook. No live code
path references the managed project anymore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 09:26:58 +02:00

36 lines
1.5 KiB
Bash

#!/bin/bash
SERVICE_KEY="${SUPABASE_SERVICE_ROLE_KEY}"
BASE_URL="${NEXT_PUBLIC_SUPABASE_URL:?NEXT_PUBLIC_SUPABASE_URL is required (self-hosted: https://supabase.orangecat.ch) - managed cloud retired}"
# Check realtime config via the Supabase REST API
echo "Checking realtime enablement for tables..."
# This checks if the messages table has replica identity configured for realtime
echo "1. Checking messages table replica identity..."
curl -s "${BASE_URL}/rest/v1/" \
-H "apikey: ${SERVICE_KEY}" \
-H "Authorization: Bearer ${SERVICE_KEY}" 2>/dev/null | head -5
# We can verify realtime works by checking the /realtime/v1/websocket endpoint
echo ""
echo "2. Realtime endpoint check..."
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" "${BASE_URL}/realtime/v1/websocket?apikey=${SERVICE_KEY}&log_level=error"
echo ""
echo "3. Testing mark_conversation_read function..."
curl -s "${BASE_URL}/rest/v1/rpc/mark_conversation_read" \
-H "apikey: ${SERVICE_KEY}" \
-H "Authorization: Bearer ${SERVICE_KEY}" \
-H "Content-Type: application/json" \
-d '{
"p_conversation_id": "2ef0fe8f-79ba-497e-8fe2-b66a9e4759a3",
"p_user_id": "cec88bc9-557f-452b-92f1-e093092fecd6"
}' | jq .
echo ""
echo "4. Verifying read time was updated..."
curl -s "${BASE_URL}/rest/v1/conversation_participants?conversation_id=eq.2ef0fe8f-79ba-497e-8fe2-b66a9e4759a3&user_id=eq.cec88bc9-557f-452b-92f1-e093092fecd6&select=last_read_at" \
-H "apikey: ${SERVICE_KEY}" \
-H "Authorization: Bearer ${SERVICE_KEY}" | jq .[0].last_read_at