-
-
Notifications
You must be signed in to change notification settings - Fork 123
Add NODE_ENV configuration for production cyf-hosting deployments #1727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add NODE_ENV configuration for production cyf-hosting deployments #1727
Conversation
Adds instructions to set NODE_ENV=production for all Node.js applications to prevent resource exhaustion on the hosting infrastructure. Changes: - Added step-by-step guide for setting NODE_ENV environment variable - Includes screenshots for clarity - Applied to both backend and frontend deployment guides This configuration is now mandatory for all JavaScript/Node.js projects to ensure applications run in production mode rather than development mode.
👷 Deploy request for cyf-curriculum pending review.Visit the deploys page to approve it
|
👷 Deploy request for cyf-piscine pending review.Visit the deploys page to approve it
|
👷 Deploy request for cyf-common pending review.Visit the deploys page to approve it
|
👷 Deploy request for cyf-sdc pending review.Visit the deploys page to approve it
|
👷 Deploy request for cyf-itd pending review.Visit the deploys page to approve it
|
👷 Deploy request for cyf-tracks pending review.Visit the deploys page to approve it
|
👷 Deploy request for cyf-launch pending review.Visit the deploys page to approve it
|
illicitonion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - a few small suggestions, thanks!
|
|
||
| ## Add NODE_ENV to Your Project | ||
|
|
||
| **Required for:** All JavaScript/Node.js projects (frontend and backend) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Required for:** All JavaScript/Node.js projects (frontend and backend) | |
| **Required for:** All Node.js projects (anything that has a `package.json` file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update and change the code as you suggested
| 3. Fill in the form: | ||
| - **Name:** `NODE_ENV` | ||
| - **Value:** `{{team.NODE_ENV}}` | ||
| - Check **"Available at Runtime"** ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Check **"Available at Runtime"** ✅ | |
| - Make sure **"Available at Build time" is not checked** ❌ | |
| - Make sure **"Available at Runtime"** is checked ✅ |
|
|
||
| ## Add NODE_ENV to Your Project | ||
|
|
||
| **Required for:** All JavaScript/Node.js projects (frontend and backend) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Required for:** All JavaScript/Node.js projects (frontend and backend) | |
| **Required for:** All Node.js projects (anything that has a `package.json` file) |
| 3. Fill in the form: | ||
| - **Name:** `NODE_ENV` | ||
| - **Value:** `{{team.NODE_ENV}}` | ||
| - Check **"Available at Runtime"** ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Check **"Available at Runtime"** ✅ | |
| - Make sure **"Available at Build time" is not checked** ❌ | |
| - Make sure **"Available at Runtime"** is checked ✅ |
What does this change?
Adds step-by-step instructions for configuring NODE_ENV on all Node.js applications deployed to CYF Hosting.
Changes:
Why this is important:
This configuration is now mandatory for all JavaScript/Node.js projects deployed to CYF Hosting. Without NODE_ENV, applications run in development mode with file watching enabled, consuming ~100x more system resources per container. This inefficiency led to infrastructure failures on January 28, 2026, when file descriptors were exhausted across 150+ deployments. Setting NODE_ENV ensures applications run efficiently and maintains hosting stability for all users.
Common Content?
Common Theme?
Issue number: # Related to infrastructure incident on 2026-01-28
Org Content?
Guide | CYF Hosting | Deployment | Configuration
Checklist
Who needs to know about this?
@illicitonion