Skip to content

Commit e266ec7

Browse files
Merge pull request #208 from Cinzya/nextjs-dockerfile
Dockerfile deployment instructions for NextJS
2 parents ff24ade + b6afe92 commit e266ec7

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

docs/applications/nextjs.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,24 @@ NextJS is a React framework that enables functionality such as server-side rende
88

99
[Example repository.](https://github.com/coollabsio/coolify-examples/tree/main/nextjs)
1010

11-
## Server build (NodeJS)
11+
## Deploy with Nixpacks
12+
13+
### Server build (NodeJS)
1214

1315
- Set `Build Pack` to `nixpacks`.
1416

15-
## Static build (SPA)
17+
### Static build (SPA)
1618

1719
- Set `Build Pack` to `nixpacks`.
1820
- Enable `Is it a static site?`.
1921
- Set `Output Directory` to `out`.
22+
23+
## Deploy with Dockerfile
24+
25+
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.
26+
27+
### Prerequisites
28+
29+
1. Set `Ports Exposes` field to `3000`.
30+
2. Create a `Dockerfile` in the root of your project and copy the content from the official [NextJS Repository](https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile).
31+
3. Set the Build Pack to `Dockerfile`.

0 commit comments

Comments
 (0)