Back to Rivet

Deploying to Supabase Functions

website/src/content/docs/deploy/supabase.mdx

2.3.21.5 KB
Original Source

This guide covers deploying an existing Rivet project to Supabase Edge Functions.

Prerequisites

Steps

<Steps> <Step title="Set up your project">

Follow the Supabase Functions Quickstart to set up your project locally.

</Step> <Step title="Set Secrets">

Set your Rivet connection values as Supabase secrets. Find RIVET_ENDPOINT and RIVET_PUBLIC_ENDPOINT in the Rivet Dashboard under Settings → Namespace → Advanced → Backend Configuration and copy them in.

sh
npx supabase secrets set \
  RIVET_ENDPOINT=https://your-namespace:[email protected] \
  RIVET_PUBLIC_ENDPOINT=https://[email protected]
</Step> <Step title="Deploy">
sh
npx supabase functions deploy rivet
</Step> <Step title="Register the Serverless Runner URL">

After deploy, set the function URL with the /api/rivet path as the serverless runner URL in Rivet. For a function named rivet, this is usually https://your-project.functions.supabase.co/functions/v1/rivet/api/rivet.

</Step> </Steps>