You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-4Lines changed: 28 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,20 @@ By default, Next.js applications often bind to `localhost` (127.0.0.1). Inside a
9
9
10
10
**This Egg fixes that** by automatically forcing the start command to listen on all interfaces (`0.0.0.0`), ensuring your site is immediately accessible after deployment.
11
11
12
+
It also improves startup reliability by using smarter dependency install behavior with package manager detection:
13
+
14
+
*`auto` mode detects lockfiles and picks `pnpm`, `yarn`, or `npm` automatically.
15
+
* In `start` mode, it installs production dependencies and builds before launch.
16
+
* In `dev` mode, it installs full dependencies so local development tools still work.
17
+
12
18
---
13
19
14
20
## 🧩 Supported Versions
15
21
16
22
This Egg comes pre-configured with **all modern Node.js versions**, selectable during installation:
17
23
18
-
***Node.js 24** (Latest)
24
+
***Node.js 25** (Latest)
25
+
***Node.js 24** (LTS)
19
26
***Node.js 23**
20
27
***Node.js 22** (LTS)
21
28
***Node.js 21**
@@ -31,19 +38,36 @@ This Egg comes pre-configured with **all modern Node.js versions**, selectable d
31
38
32
39
***🔌 Instant Connectivity:** Pre-configured to listen on `0.0.0.0`, solving connection timeouts.
33
40
***📦 Auto-Install:** Automatically runs `npm install` on startup if packages are missing.
34
-
***⚙️ Auto-Build:** Runs `npm run build` to ensure your production build is fresh.
41
+
***⚙️ Smart Build:** Runs `npm run build` automatically in production mode (`NODE_RUN_ENV=start`).
42
+
***🧠 Package Manager Auto-Detect:** Supports `npm`, `pnpm`, and `yarn` with optional manual override.
35
43
***🔒 Secure:** Based on the official Pterodactyl Docker images (Parkervcp/Yolks).
44
+
***✅ Better Validation:** Restricts runtime mode to `start` or `dev` to prevent invalid command values.
45
+
46
+
## 🔧 Recommended Variables
47
+
48
+
*`NODE_RUN_ENV`: `start` for production, `dev` for development.
49
+
*`PACKAGE_MANAGER`: `auto` (default), `npm`, `pnpm`, or `yarn`.
36
50
37
51
## 📥 Installation Guide
38
52
39
-
1.**Download:** Get the `egg-nextjs.json` file from this repository (or copy the RAW link).
53
+
1.**Download:** Get the `nextjs-egg.json` file from this repository (or copy the RAW link).
40
54
2.**Import:** Go to your **Pterodactyl Admin Panel** -> **Nests** -> **Import Egg**.
41
55
3.**Select Nest:** Choose the appropriate Nest (usually "NodeJS" or "Generic").
42
-
4.**Upload:** Upload the JSON file.
56
+
4.**Upload:** Upload `nextjs-egg.json` and complete the import wizard.
43
57
5.**Deploy:** You can now create new servers using this Egg!
44
58
45
59
---
46
60
61
+
## 🛠️ Troubleshooting
62
+
63
+
***Install fails with package manager errors:** Set `PACKAGE_MANAGER` manually to `npm`, `pnpm`, or `yarn` instead of `auto`.
64
+
***`pnpm` or `yarn` command not found:** Keep `PACKAGE_MANAGER=npm` or ensure Corepack is available in your selected Node image.
65
+
***Unexpected dependency behavior:** Verify lockfiles in your project root (`package-lock.json`, `pnpm-lock.yaml`, or `yarn.lock`).
66
+
***Server builds on every boot in production:** This is expected when `NODE_RUN_ENV=start`; use `dev` while iterating quickly.
67
+
***Server not reachable from outside:** Confirm your panel allocation/port is correct; this Egg already binds Next.js to `0.0.0.0`.
68
+
69
+
---
70
+
47
71
## ☕ Support My Work
48
72
49
73
If this Egg saved you time or fixed your server headaches, consider supporting my work! It helps me keep creating tools and fixes.
0 commit comments