Deploying Basejump

Once you're ready to go to production, deploying to your Supabase account is easy. This guide assumes that you've already installed the Supabase CLI

Setup your account

Head to Supabase and create a new project. Make sure you record your database password somewhere secure, you'll need it later. Create a new Supabase project

Setup the Supabase CLI

In general, you can follow the official guide for up to date info.

Login to Supabase

supabase login

Link your project

You can get your project ID on the Settings page of your project. To finish this, you'll need the database password you input when creating your project.

supabase link --project-ref <project-id>

Run your migrations

You'll need your database password for this step too.

supabase db push

Deploy your edge functions

The billing portion of Basejump is handled through two edge functions - one for general billing lookups and one for handling provider webhooks.

To deploy them, you'll first add your secrets to production

supabase secrets set STRIPE_API_KEY=<your-stripe-secret-key>
supabase secrets set STRIPE_WEBHOOK_SIGNING_SECRET=<your-stripe-webhook-secret>

Then you can deploy the functions

supabase functions deploy billing-functions
supabase functions deploy billing-webhooks --no-verify-jwt