Deployment

Deploy Openfront E-commerce with explicit migration, secret, provider, and rollback ownership.

Openfront E-commerce needs a Node.js 20+ runtime, persistent PostgreSQL and S3-compatible storage. Email, payment, shipping and AI settings depend on the features you enable. See Getting started for the full variable list.

Scripts

ScriptEffect
npm run buildkeystone build --no-ui && next build. No migration step.
npm run migrate, npm run release:migrateprisma migrate deploy
npm startnext start
npm run devBuilds the schema, migrates, and starts the dev server. Do not use it against production.

Run npm run migrate once per release, from one process, rather than letting several instances migrate on start at the same time.

The included railway.toml builds with keystone build --no-ui && next build and starts with npm run migrate && next start, because Railway's build step cannot reach an internal database. If you scale to several instances, move the migration into a single release step. The README also has a Vercel import button. There is no Dockerfile in the repository.

Required production settings

  • DATABASE_URL and a random SESSION_SECRET of at least 32 characters.
  • All five S3_* variables. features/keystone/index.ts throws when one is missing and NODE_ENV=production.
  • NEXT_PUBLIC_BACKEND_URL when the public origin differs from what the request headers report.
  • TRUSTED_PROXY_IPS if API-key IP restrictions must see the real client IP behind a proxy.
  • Share the same database, SESSION_SECRET, CREDENTIAL_PEPPER and storage across every instance. Cart proofs and hashed tokens depend on the secret.

Background work

There is no background worker. Outgoing webhooks are delivered when the triggering change happens. Failed deliveries are retried only when an operator calls the retryWebhookDeliveries mutation.

Release checklist

  1. Pin and review the source revision.
  2. Back up production. Test pending migrations on a copy.
  3. Build, migrate once, then start.
  4. Check /dashboard sign-in, the storefront country redirect, and /api/graphql.
  5. Run a checkout with each enabled payment provider with its test credentials, including the webhook at /api/payment-webhooks/<providerId>.
  6. Check fulfillment, label, return and refund paths you plan to use.
  7. Keep an application rollback and a database recovery plan.

On this page