- Add manual deployment instructions for self-hosted Supabase - Add schema refresh SQL scripts - Add deployment helper scripts - Add Supabase environment configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2.9 KiB
2.9 KiB
Manual Deployment Instructions for Self-Hosted Supabase
Since you're using self-hosted Supabase, here's how to deploy the edge function:
Option 1: Via Supabase CLI (Recommended)
If you have Supabase CLI installed:
# Link to your self-hosted instance
supabase link --project-ref your-project-id
# Deploy the function
supabase functions deploy create-google-meet-event --verify-jwt
Option 2: Direct File Upload to Supabase Container
For self-hosted Supabase, you need to:
-
SSH into your Supabase container or access via dashboard
-
Copy the function file to the correct location:
# Path in Supabase: /var/lib/postgresql/functions/create-google-meet-event/index.ts # Or wherever your functions are stored -
Restart the Supabase functions service
Option 3: Use Docker Exec (If running in Docker)
# Find the Supabase container
docker ps | grep supabase
# Copy function file into container
docker cp supabase/functions/create-google-meet-event/index.ts \
<container-id>:/home/deno/functions/create-google-meet-event/index.ts
# Restart the functions service
docker exec <container-id> supervisorctl restart functions:*
Option 4: Update via Supabase Dashboard (If Available)
- Access your Supabase dashboard at
https://lovable.backoffice.biz.id - Navigate to Edge Functions
- Click New Function or edit existing
- Paste the code from
supabase/functions/create-google-meet-event/index.ts - Set Verify JWT to
true - Save
Quick Test to Verify Function Exists
curl -X GET "https://lovable.backoffice.biz.id/functions/v1/create-google-meet-event" \
-H "Authorization: Bearer YOUR_ANON_KEY"
Expected: Should get a method not allowed error (which means function exists)
Schema Cache Fix
For the schema cache issue with the google_service_account_json column:
Run this in Supabase SQL Editor:
-- Step 1: Verify column exists
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_name = 'platform_settings'
AND column_name = 'google_service_account_json';
-- Step 2: Force cache refresh
NOTIFY pgrst, 'reload schema';
-- Step 3: Test query
SELECT google_service_account_json FROM platform_settings;
Or restart PostgREST:
If you have access:
# In Supabase container/system
supervisorctl restart postgrest
Frontend workaround:
If the schema cache persists, you can bypass the type-safe client and use raw SQL:
// In IntegrasiTab.tsx, temporary bypass
const { data } = await supabase
.rpc('exec_sql', {
sql: `UPDATE platform_settings SET google_service_account_json = '${JSON.stringify(settings.integration_google_service_account_json)}'::jsonb`
});
Next Steps
- Deploy the function using one of the methods above
- Run the schema refresh SQL
- Try saving the settings again
- Test the connection
Let me know which deployment method works for your setup!