ShiftFast Docs
Deployment

Deployment Overview

The go-live checklist: a production database, Clerk's production instance, Stripe in live mode, and deploying to your host.

ShiftFast is a standard Next.js app with no host-specific code: it runs on any host that runs Next.js (pnpm build + pnpm start), or as a container from the included Dockerfile. No CI pipeline ships with it.

Clerk and Stripe keep their production settings separate from development, so most of this is repeating your Setup steps in production mode.

Set up a production database

Create a hosted Postgres database and run the migrations against it:

DIRECT_URL="<production direct URL>" pnpm db:migrate

Migrations never run automatically — pnpm build doesn't touch the database. From now on, apply each migration to production with the command above before deploying the code that needs it, so the new code never runs against the old schema.

Set up Clerk's production instance

Create the production instance in the Clerk Dashboard. It doesn't copy your development settings, so repeat Configure Clerk: enable Organizations with Membership required, set the default membership limit, and point the Paths at your production domain.

Set up Stripe in live mode

Repeat Stripe Setup in live mode: create the live prices, turn on plan switching in the live customer portal, and add a webhook endpoint at https://your-domain/api/webhooks/stripe with the five billing events.

Deploy to your host

Set every variable from Configuration on your host, with production values:

  • NEXT_PUBLIC_APP_URL set to your real domain — links, redirects, and social images are built from it.
  • Live Clerk and Stripe keys (pk_live_/sk_live_), not the test ones.
  • The live NEXT_PUBLIC_PRICE_* IDs.
  • STRIPE_WEBHOOK_SECRET from the live webhook endpoint. The secret from stripe listen won't verify production events.

Then deploy:

On any other Node host, install, build, migrate, and start: pnpm install, pnpm build, pnpm db:migrate, then pnpm start.

Check the live site

Once the deploy finishes, run through the same check as Setup on the live site, with a real card. Refund the payment from the Stripe Dashboard afterwards. In Stripe, the webhook endpoint's event log should show each event delivered with a 200.

On this page