|
|
@@ -452,13 +452,28 @@ RESEND_API_KEY=your_resend_api_key
|
|
|
|
|
|
### Supabase Database Settings (for pg_cron)
|
|
|
|
|
|
-Configure in Supabase Dashboard → Project Settings → Database → Custom Postgres Configuration:
|
|
|
+**CRITICAL**: Configure in Supabase Dashboard → Project Settings → Database → Custom Postgres Configuration:
|
|
|
|
|
|
```
|
|
|
app.internal_sync_secret = 'same_as_INTERNAL_SYNC_SECRET_above'
|
|
|
app.supabase_url = 'https://YOUR_PROJECT.supabase.co'
|
|
|
```
|
|
|
|
|
|
+**Why this is required**: The pg_cron jobs run database-side trigger functions that need to make HTTP requests to Edge Functions. These settings allow the trigger functions to authenticate and call the scheduled sync Edge Functions.
|
|
|
+
|
|
|
+**Without these settings**:
|
|
|
+- pg_cron jobs will run successfully but silently fail
|
|
|
+- No sync will actually happen (appears "stuck")
|
|
|
+- No error logs will be visible
|
|
|
+
|
|
|
+**To verify settings are configured**:
|
|
|
+```sql
|
|
|
+SELECT
|
|
|
+ current_setting('app.internal_sync_secret', true) as internal_secret,
|
|
|
+ current_setting('app.supabase_url', true) as supabase_url;
|
|
|
+```
|
|
|
+Both values should be non-NULL.
|
|
|
+
|
|
|
## Deployment
|
|
|
|
|
|
### Frontend
|