Welcome to Nebutra Sailor Docs ๐ŸŽ‰
ChangelogIntroductionLicensing
Help Center (External) โ†—

Deployment Overview

The template chooses no platform โ€” portable Next standalone builds and Dockerfiles, run wherever you want.

The template makes no platform choice

Per ADR 2026-06-04, production runtime closure and ADR 2026-09-24, Sailor convergence ยง5: the template ships Next standalone builds and Dockerfiles, and create-sailor asks nothing about where they run. There is no --deploy vercel|railway|cloudflare flag, no DEPLOY_TARGET_* selector in a scaffolded project, and no platform-specific config baked in. What follows is what the code actually gives you to deploy โ€” not any particular company's production setup.

What create-sailor generates

FilePurpose
Dockerfile.webMulti-stage build for apps/web (Next output: "standalone") โ€” the default deploy unit, since the gateway is mounted inside it
docker-compose.ymlweb + local postgres + redis, for a one-command local or single-VM stack
backends/gateway/DockerfileA separate image for the gateway, for when you run it standalone (see below)

Any host that can run a Docker image or a node server.js process works: a VM, Fly, Railway, Render, ECS, a Kubernetes cluster, or a platform like Vercel that builds Next.js directly (see Vercel).

The gateway: embedded or external

backends/gateway (Hono) is the sole business API. By default it's mounted in-process inside apps/web at app/api/[[...route]]/route.ts:

GATEWAY_MODE=embedded   # default โ€” one process, one origin, one deploy
GATEWAY_MODE=external   # apps/web 404s every unmatched /api/* path and mounts nothing;
                         # you build and run backends/gateway (its own Dockerfile) standalone

Pick external only if you actually need to scale or deploy the gateway independently from the frontend. Nothing in the template requires it.

Before you deploy: pnpm db:deploy

Run this before the new app version starts serving traffic โ€” it applies pending migrations, then platform.sql + the generated RLS policies, then verifies the database matches schema.prisma, failing loud on any drift:

pnpm db:deploy

See Database Overview and Row-Level Security for what this command actually does. However you wire your deploy pipeline, this step belongs before the app starts, not after โ€” db:migrate (prisma migrate dev) is for local development only.

Environment variables

Every required variable is validated at startup and fails fast with a descriptive error โ€” see Environment Variables for the full reference. At minimum, a production deploy needs DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL / NEXT_PUBLIC_AUTH_URL, and SERVICE_SECRET.

Related

Docker Deployment

Build and run the generated Dockerfiles yourself.

Vercel

Deploying the Next.js apps on Vercel.

Production Checklist

Pre-go-live checks.

Database Overview

pnpm db:deploy and the generated-RLS model.

How is this guide?

Edit on GitHub

Last updated on

On this page

The template makes no platform choice
What create-sailor generates
The gateway: embedded or external
Before you deploy: pnpm db:deploy
Environment variables
Related