Deployment
Production Checklist
Environment variables
NEXT_PUBLIC_SITE_URL
should be set to your production domain (eg: https://yourapp.com)
- Your supabase Urls stay the same.
- Please consult your third party services for their production environment variable setting guidelines.
Supabase production checklist
- Ensure that you follow the supabase production checklist here
- If you are using Resend or any custom SMTP server (which you should on production), see how you can set it up here.
Enable Stripe live mode
- Enter live mode in stripe
- Grab the environment variables and ensure that you are entering the correct Stripe environment variables for in your hosting provider.
Setup Stripe webhooks
- In the Stripe webhooks section setup a stripe webhook listener at https://yourapp.com/api/stripe/webhooks.
- Click on Add an endpoint.
- In the
Listen to Stripe Events
section add
` https://yourapp.com/api/stripe/webhooks ` as the endpoint.
- Description is optional
- Select ` Events on your account `.
- Click on
+ Select events
and select all events. Click on Add Events
.
- Click on Add ` Endpoint `. This will now sync Stripe to your product deployment.
First Deployment with Vercel
- https://vercel.com/guides/deploying-nextjs-with-vercel Follow this guide to setup Next.js deployment with Vercel.
- Deploy the app with and assign it your domain (eg: https://yourapp.com).
Stripe products
- Create at least one live mode product in Stripe so that it gets synced to your supabase database.
- It is important that your app is deployed and the Stripe webhooks are configured before you create a product in Stripe. Otherwise the product will not be synced to your supabase database.