Deployment
Your indiegoon app is a standard Next.js project. Deploy it anywhere Next.js runs.
Using the CLI
goon deploy
Pick your provider and the CLI handles authentication checks, build verification, and deployment.
Vercel (Recommended)
The fastest path to production for Next.js apps.
Deploy
npx vercel
Environment Variables
Add all your .env variables in the Vercel dashboard:
- •Go to Project Settings → Environment Variables
- •Add each variable (or import from
.env) - •Set the correct scope (Production, Preview, Development)
Key Settings
- •Framework: Auto-detected as Next.js
- •Build command:
npm run build - •Output directory:
.next - •Node.js version: 18.x or 20.x
Webhooks
Set your webhook URL to:
https://your-app.vercel.app/api/webhooks/payments
Railway
PostgreSQL + app in one place. Great for indie hackers.
Deploy
railway login
railway init
railway add postgresql
railway up
Railway automatically:
- •Provisions a PostgreSQL database
- •Sets
DATABASE_URLas a service variable - •Deploys your app with
npm run build && npm run start
Environment Variables
railway variables set BETTER_AUTH_SECRET="..." PAYMENT_PROVIDER="stripe" ...
Or use the Railway dashboard.
Docker
For self-hosting or custom infrastructure.
Dockerfile
indiegoon includes a production-ready Dockerfile:
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]
Docker Compose
services:
app:
build: .
ports:
- "3000:3000"
environment:
- DATABASE_URL=postgresql://postgres:password@db:5432/mydb
- BETTER_AUTH_SECRET=your-secret
- PAYMENT_PROVIDER=stripe
- STRIPE_SECRET_KEY=sk_live_...
depends_on:
- db
db:
image: postgres:16-alpine
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=mydb
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:
docker compose up -d
Fly.io
Global edge deployment with persistent volumes.
fly launch
fly deploy
Set secrets:
fly secrets set DATABASE_URL="..." BETTER_AUTH_SECRET="..."
Production Checklist
Before going live, verify:
Security
- •
BETTER_AUTH_SECRETis a strong random value (not the dev one) - •
BETTER_AUTH_URLmatches your production domain - • Payment webhook secrets are set for production
- • Rate limiting is configured (Upstash Redis)
Database
- • Using a production database (not local)
- • Migrations are applied (
npm run db:migrate) - • Connection uses SSL (
?sslmode=require)
Payments
- • Using live API keys (not test keys)
- • Webhook URL is set in provider dashboard
- • Tested a real payment end-to-end
- • Using a verified sending domain
- • From address matches your domain
- • Tested transactional email delivery
DNS & SSL
- • Custom domain configured
- • SSL certificate is active
- •
wwwredirects to apex (or vice versa)
Monitoring
- • Error tracking (Sentry, Highlight, etc.)
- • Uptime monitoring (Better Uptime, Pingdom)
- • Log aggregation (if self-hosting)
Security Headers
next.config.ts includes production security headers out of the box:
- •HSTS — 2-year max-age with subdomains
- •X-Frame-Options — DENY (prevents clickjacking)
- •X-Content-Type-Options — nosniff
- •Referrer-Policy — strict-origin-when-cross-origin
- •Permissions-Policy — blocks camera, mic, geolocation, FLoC
Next Steps
- •Environment Variables — Complete reference of all env vars
- •Theming — Customize your app's look and feel