Deployment
Deployment
The repository includes a self-hosted deployment flow and can also be deployed on managed Next.js platforms.
Self-hosted flow
The existing script pair is:
| File | Runs on | Purpose |
|---|---|---|
deploy-build.bat | Windows/local machine | Build, package, upload artifacts |
start-prod.sh | Linux/server | Install production dependencies and start/restart app |
Typical flow:
- Configure SSH host, deploy path, and key path in
deploy-build.bat. - Confirm production
.envexists on the server. - Run the script locally:
deploy-build.bat
- The script builds locally, creates an archive, uploads it, then starts the app on the server.
Production environment
At minimum, production needs:
DATABASE_URL="postgresql://..."
BETTER_AUTH_SECRET="strong-production-secret"
BETTER_AUTH_URL="https://your-domain.com"
Add the optional services you actually use: Creem, Resend, storage, Redis, Sentry, Axiom, Inngest, and AI provider credentials.
Vercel
For Vercel:
- Import the GitHub repository.
- Set all production environment variables.
- Make sure the database is reachable from Vercel.
- Configure webhook URLs with the Vercel production domain.
- Run migrations before or during release.
Release checklist
pnpm typecheckpasses.pnpm buildpasses.- Database migrations are ready.
BETTER_AUTH_URLuses the production domain.- OAuth callback URLs use the production domain.
- Creem webhook URL points to
/api/webhooks/creem. - Sentry/Axiom do not receive raw secrets.