Next.js
gy detects Next.js from your package.json dependencies and builds a production-optimized
container.
Deploy
Section titled “Deploy”cd my-next-appgy deployAutomatic detection
Section titled “Automatic detection”gy recognizes the Next.js build pipeline:
- Runs
next build - Starts the server with
next starton port3000
Server-side rendering & API routes
Section titled “Server-side rendering & API routes”SSR, ISR, and API routes work out of the box because gy runs the full Next.js server — no
framework-specific rewrites needed.
Examples
Section titled “Examples”# Basic deploygy deploy
# Custom name, tier, and domaingy deploy --name storefront --tier t2 --domain www.mystore.comEnvironment variables
Section titled “Environment variables”// pages/api/... or app/... route handlersexport const runtime = 'nodejs';const key = process.env.API_KEY;gy config set env API_KEY=...gy config sync