Deployment guide for 5CRSE on Vercel + Neon PostgreSQL
#Step 1: Neon Database
The production database is hosted on Neon (Serverless PostgreSQL).
- Project:
ep-proud-breeze-am3cdnlf(US East 1) - Database:
neondb - Connection:
postgresql://neondb_owner:***@ep-proud-breeze-am3cdnlf.c-5.us-east-1.aws.neon.tech/neondb?sslmode=require
Both Vercel Production and Preview environments use this database via DATABASE_URL.
#Step 2: Database Adapter
The project uses @payloadcms/db-postgres with Drizzle ORM:
// src/payload.config.ts
import { postgresAdapter } from '@payloadcms/db-postgres'
db: postgresAdapter({
pool: {
connectionString: process.env.DATABASE_URL || '',
},
push: false,
prodMigrations: migrations,
migrationDir: path.resolve(dirname, 'migrations'),
}),
#Step 3: Migrations
Schema changes use Payload's migration system (Drizzle under the hood):
# Create a new migration after schema changes
pnpm payload migrate:create
# Run migrations (happens automatically during build)
pnpm payload migrate
The build script runs payload migrate && next build automatically.
#Step 4: Vercel Blob Storage (media uploads)
Media uploads use @payloadcms/storage-vercel-blob:
import { vercelBlobStorage } from '@payloadcms/storage-vercel-blob'
plugins: [
vercelBlobStorage({
collections: { media: true },
token: process.env.BLOB_READ_WRITE_TOKEN || '',
}),
],
#Step 5: Deploy to Vercel
- Push to
mainbranch — Vercel auto-deploys - Or manually:
npx vercel --prod
Required Environment Variables on Vercel:
| Variable | Description |
|---|---|
DATABASE_URL | Neon PostgreSQL connection string |
POSTGRES_URL | Same as DATABASE_URL (for compatibility) |
POSTGRES_URL_NON_POOLING | Direct connection for migrations |
PAYLOAD_SECRET | Random secret for Payload CMS auth |
BLOB_READ_WRITE_TOKEN | Vercel Blob storage token |
OPENAI_API_KEY | OpenAI API key for AI assistant |
STRIPE_SECRET_KEY | Stripe secret key |
NEXT_PUBLIC_STRIPE_KEY | Stripe publishable key |
NEXT_PUBLIC_PAYLOAD_URL | Deployment URL (e.g. https://5crse.com) |
PAYLOAD_PUBLIC_SERVER_URL | Same as NEXT_PUBLIC_PAYLOAD_URL |
TICKETMASTER_API_KEY | Ticketmaster Discovery API key |
GEMINI_API_KEY | Google Gemini for image generation |
#Step 6: Post-Deploy
Visit https://5crse.com/admin to access the admin panel.
Domains: 5crse.com, www.5crse.com, 5crse.vercel.app
