Deployment
Build, migrate, workers, and production settings for Openfront Grocery.
Provision
PostgreSQL (back it up before migrating) and an S3-compatible bucket for product images.
Configure
DATABASE_URL, SESSION_SECRET (32+ characters), PUBLIC_STORE_ID=store_juniper, NEXT_PUBLIC_SITE_URL, the S3_* variables, SMTP, and Stripe. See Getting started.
Build, migrate, start
npm run build
npm run migrate
npm startrailway.toml runs npm run migrate && next start at start.
Register the Stripe webhook
/api/payments/webhooks/pp_stripe_default
Start the workers
Run each as a supervised process:
| Command | Does |
|---|---|
npm run worker:events | Emails, stock and price alerts, outbound events |
npm run worker:subscriptions | Prepares due recurring baskets |
npm run worker:refund-reconcile | Checks pending refunds with the provider |
Each needs a store staff user with the right capability: GROCERY_EVENT_WORKER_USER_ID, GROCERY_SUBSCRIPTION_OPERATOR_ID, REFUND_RECONCILIATION_USER_ID.
Check health
/api/health checks the database.
Set TRUSTED_PROXY=true only behind an edge that overwrites X-Real-IP. Set MCP_ENABLED=true to turn on /api/mcp-transport/[transport].