Skip to main content

Next.js

Next.js is a React framework that enables functionality such as server-side rendering and generating static websites.

Example repository.

Deploy with Nixpacks​

Server build (Node.js)​

  • Set Build Pack to nixpacks.

Static build (SPA)​

  • Set Build Pack to nixpacks.
  • Enable Is it a static site?.
  • Set Output Directory to out.

Deploy with Dockerfile​

If you are having problems with Nixpacks or want more control over the building stage, you can use a Dockerfile.

Prerequisites​

  1. Set Ports Exposes field to 3000.
  2. Create a Dockerfile in the root of your project and copy the content from the official Next.js Repository.
  3. Set the Build Pack to Dockerfile.