Skip to content

Next.js

gy detects Next.js from your package.json dependencies and builds a production-optimized container.

Terminal window
cd my-next-app
gy deploy

gy recognizes the Next.js build pipeline:

  1. Runs next build
  2. Starts the server with next start on port 3000

SSR, ISR, and API routes work out of the box because gy runs the full Next.js server — no framework-specific rewrites needed.

Terminal window
# Basic deploy
gy deploy
# Custom name, tier, and domain
gy deploy --name storefront --tier t2 --domain www.mystore.com
// pages/api/... or app/... route handlers
export const runtime = 'nodejs';
const key = process.env.API_KEY;
Terminal window
gy config set env API_KEY=...
gy config sync