Deploy
Vercel
Standard Next.js flow — import the repo in the Vercel console, set the environment variables (required vars), and deploy. Use a hosted database (PostgreSQL / MySQL / Turso); run migrations separately:
pnpm db:generate && pnpm db:migrateDocker
The repo ships a multi-stage Dockerfile (node:22-alpine, Next.js standalone output, port 3000):
docker build -t my-app .
docker run -p 3000:3000 --env-file .env.production my-app
DATABASE_PROVIDERis baked in at build time — the schema template is selected during the image build. To target PostgreSQL:
docker build --build-arg DATABASE_PROVIDER=postgres -t my-app .Cloudflare Workers
wrangler.jsonc is pre-configured with nodejs_compat and a D1 database binding:
{
"name": "shipany-next",
"compatibility_flags": ["nodejs_compat"],
"vars": { "DATABASE_PROVIDER": "d1" },
"d1_databases": [
{
"binding": "DB",
"database_name": "shipany-next",
"database_id": "...",
"migrations_dir": "drizzle"
}
]
}npx wrangler d1 create shipany-next # then fill database_id into wrangler.jsonc
pnpm db:generate # D1 applies migrations from ./drizzle
npx wrangler deployWorkers caveats:
- TCP sockets can't be reused across requests — Postgres/MySQL connections are created per request (use Hyperdrive for pooling)
- D1 transactions are emulated, not real transactions