Ship

Deploy

Build the Docker image and go live.

01Docker

Terminal
docker build --build-arg NEXT_PUBLIC_APP_URL=https://app.example.com -t your-saas .
npm run db:migrate   # against the production database
docker run --env-file .env.production -p 3000:3000 your-saas

NEXT_PUBLIC_* values are baked in at build time; server secrets are read when the container starts. The image uses Next's standalone output.

02Go-live checklist

  • BETTER_AUTH_URL and NEXT_PUBLIC_APP_URL set to the live URL
  • Live billing keys, price IDs and the live webhook signing secret
  • A verified sending domain for Resend
  • Inngest keys for background jobs
  • Never TEST_MODE: it turns on the dev mailbox and test helpers