Deployment
Deploy your application to production.
Overview
This is a single Next.js application. Deploy it anywhere that supports Node.js.
Production Checklist
Before deploying, ensure:
Environment Variables
-
NEXT_PUBLIC_APP_URLset to production URL -
NEXT_PUBLIC_SUPABASE_URLset to production Supabase -
NEXT_PUBLIC_SUPABASE_ANON_KEYset to production key -
DATABASE_URLset to production Postgres -
STRIPE_SECRET_KEYusing live keys (not test) -
STRIPE_WEBHOOK_SECRETfor production webhook -
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYusing live key
Supabase
- Create production Supabase project
- Run
./coremvp connect supabaseto create or link the project and apply migrations - Verify the linked database with
./coremvp connect supabase verify - Save the hosted Site URL and Redirect URLs in Supabase URL Configuration
- Configure OAuth redirect URLs
- Set up email templates
Stripe
- Create products in live mode
- Configure webhook endpoint:
https://yourdomain.com/api/webhooks/stripe - Select all relevant events for webhook
Security
- All environment variables use production values
- HTTPS enabled (automatic on most platforms)
- Rate limiting configured (optional)
Deployment Matrix
| Option | Pros | Cons |
|---|---|---|
| Docker + VPS | Full control, predictable costs | Requires server management |
| Vercel | Easy, auto-scaling, zero-config | Usage-based pricing |
| Railway | Simple deploy, good free tier | Usage-based pricing |
Architecture
Since this is a monolithic Next.js app, deployment is straightforward:
Internet → CDN/Proxy → Next.js App → Supabase Auth / Postgres / StripeAll API routes are bundled with the Next.js application. No separate backend deployment needed.
Quick Deploy
Vercel (Easiest)
./coremvp connect supabase
./coremvp connect supabase verify
./coremvp connect vercel
./coremvp deploy vercelBefore proving hosted Auth, open Supabase URL Configuration, set Site URL to https://<project-name>.vercel.app, add https://<project-name>.vercel.app/** to Redirect URLs, and save.
Production is the default deploy target. Preview deploys are advanced until they have isolated Supabase, Stripe, and webhook values. The default ./coremvp connect vercel syncs .env to Vercel Production only.
Docker
docker build -t myapp .
docker run -p 3000:3000 --env-file .env.local myappRailway
- Connect GitHub repo
- Add environment variables
- Deploy
See individual guides for detailed steps.
Was this page helpful?