Setup
Step 1
Commit your code, switch to the main git branch and merge supabase:
git add .
git commit –m "Time to ship"
git checkout main
git merge supabase
Step 2
Use your favorite hosting provider (Vercel for me) to create a new project based on the GitHub repo. You can deploy your app anywhere NextJS is supported: Vercel, Netlify, Render, etc.
Step 3
Set the right .env file on your deployement as the .env.local is not committed.
Using Google Oauth? Going to production?
In Supabase dashboard, go to [Authentication] then [URL Configuration] and add https://your-domain.com (opens in a new tab) to [Site URL]. Then add https://your-domain.com/ (opens in a new tab)* to [Redirect URLs].
Using Stripe? Going to production?
👉Turn OFF Test Mode in your Stripe Dashboard
👉In your [Developers], copy your public & private keys and add them to STRIPE_SECRET_KEY & STRIPE_PUBLIC_KEY in your production environment variables.
👉In your [Developers], [Webhook], [Add Enpoint]. Set your domain + /api/webhook/stripe. Select [checkout.session.completed] event (or more if needed). Copy the signing secret and add it to STRIPE_WEBHOOK_SECRET in your production environment variables.
Optional: In [Balance], [Manage Payouts], set a specific date of the month to receive your payouts (I use the 10th of each month)
Optional: In [Settings], [Customers Emails], activate emails for successful payments & refunds