diff --git a/org-cyf-guides/content/deploying/cyf/backend/click_environment_variables.png b/org-cyf-guides/content/deploying/cyf/backend/click_environment_variables.png new file mode 100644 index 000000000..bb561657c Binary files /dev/null and b/org-cyf-guides/content/deploying/cyf/backend/click_environment_variables.png differ diff --git a/org-cyf-guides/content/deploying/cyf/backend/fill_the_form.png b/org-cyf-guides/content/deploying/cyf/backend/fill_the_form.png new file mode 100644 index 000000000..a03c4bcf0 Binary files /dev/null and b/org-cyf-guides/content/deploying/cyf/backend/fill_the_form.png differ diff --git a/org-cyf-guides/content/deploying/cyf/backend/index.md b/org-cyf-guides/content/deploying/cyf/backend/index.md index 91ad6ed65..a1fe38be3 100644 --- a/org-cyf-guides/content/deploying/cyf/backend/index.md +++ b/org-cyf-guides/content/deploying/cyf/backend/index.md @@ -55,6 +55,27 @@ If you want to deploy from a branch that isn't `main`, you need to configure thi ![Configure git branch](customise-branch.png) +## Add NODE_ENV to Your Project + +**Required for:** All Node.js projects (anything that has a `package.json` file) + +### Steps + +1. Click on **"Environment Variables"** in the left sidebar +2. Click the **"+ Add"** button + +![Environment Variables](click_environment_variables.png) + +3. Fill in the form: + - **Name:** `NODE_ENV` + - **Value:** `{{team.NODE_ENV}}` + - Make sure **"Available at Build time" is not checked** ❌ + - Make sure **"Available at Runtime"** is checked ✅ + +![Fill the new environment variables form](fill_the_form.png) + +4. Click **"Save"** + ## Deploying the backend When everything is configured correctly, press the **Deploy** button: diff --git a/org-cyf-guides/content/deploying/cyf/frontend/click_environment_variables.png b/org-cyf-guides/content/deploying/cyf/frontend/click_environment_variables.png new file mode 100644 index 000000000..bb561657c Binary files /dev/null and b/org-cyf-guides/content/deploying/cyf/frontend/click_environment_variables.png differ diff --git a/org-cyf-guides/content/deploying/cyf/frontend/fill_the_form.png b/org-cyf-guides/content/deploying/cyf/frontend/fill_the_form.png new file mode 100644 index 000000000..a03c4bcf0 Binary files /dev/null and b/org-cyf-guides/content/deploying/cyf/frontend/fill_the_form.png differ diff --git a/org-cyf-guides/content/deploying/cyf/frontend/index.md b/org-cyf-guides/content/deploying/cyf/frontend/index.md index 8f3a5dac2..a33cbd4ea 100644 --- a/org-cyf-guides/content/deploying/cyf/frontend/index.md +++ b/org-cyf-guides/content/deploying/cyf/frontend/index.md @@ -53,6 +53,27 @@ If you want to deploy from a branch that isn't `main`, you need to configure thi ![Configure git branch](customise-branch.png) +## Add NODE_ENV to Your Project + +**Required for:** All Node.js projects (anything that has a `package.json` file) + +### Steps + +1. Click on **"Environment Variables"** in the left sidebar +2. Click the **"+ Add"** button + +![Environment Variables](click_environment_variables.png) + +3. Fill in the form: + - **Name:** `NODE_ENV` + - **Value:** `{{team.NODE_ENV}}` + - Make sure **"Available at Build time" is not checked** ❌ + - Make sure **"Available at Runtime"** is checked ✅ + +![Fill the new environment variables form](fill_the_form.png) + +4. Click **"Save"** + ## Deploying the frontend When everything is configured correctly, press the **Deploy** button: