Skip to content

Deploy a Next.js app

  1. Push your Next.js app to GitHub.
  2. In the console, start a new app, pick the repository and click Deploy with Drone.
  3. Add your environment variables and click Deploy.

Or, from the project folder: hivepod deploy.

Pick Next.js under Choose Framework. DockHive installs your dependencies, runs next build and serves the app with next start (or the standalone server if you set output: 'standalone' in next.config.js).

Make sure package.json has the usual scripts:

package.json
{
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
}
}

next start listens on the PORT variable DockHive sets, so no extra setup is needed.

  • Environment variables: your app’s variables are available both during next build and at runtime. NEXT_PUBLIC_* values are inlined into the browser bundle at build time, so they’re public and change only when you redeploy. See Environment variables.
  • Monorepos: set Root Directory to the Next.js app’s folder, for example apps/web.