NextJS
NextJS is a React framework that enables functionality such as server-side rendering and generating static websites.
Deploy with Nixpacks
Server build (NodeJS)
- Set
Build Pack
tonixpacks
.
Static build (SPA)
- Set
Build Pack
tonixpacks
. - Enable
Is it a static site?
. - Set
Output Directory
toout
.
Deploy with Dockerfile
If you are having problems with Nixpacks or want more control over the building stage, you can use a Dockerfile to deploy your NextJS application.
Prerequisites
- Set
Ports Exposes
field to3000
. - Create a
Dockerfile
in the root of your project and copy the content from the official NextJS Repository. - Set the Build Pack to
Dockerfile
.