From c00be458d30e79b73bf06fde41829c4851b77e1a Mon Sep 17 00:00:00 2001 From: Pascal Delange Date: Wed, 22 Oct 2025 23:25:39 +0200 Subject: [PATCH] make ENV, NODE_ENV optional --- packages/app-builder/.env.example | 14 ++++++++------ packages/app-builder/src/utils/environment.ts | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/app-builder/.env.example b/packages/app-builder/.env.example index 99da9fcfc9..6fa420dcb2 100644 --- a/packages/app-builder/.env.example +++ b/packages/app-builder/.env.example @@ -8,23 +8,25 @@ # REQUIRED SETTINGS # -ENV=development -# Set to "production" if deploying instead of developing -NODE_ENV=development - # In production, generate a new random secret to sign your user's sessions. You can use this command to do so: # - openssl rand -base64 128 | tr -d "\n" SESSION_SECRET= SESSION_MAX_AGE=43200 -# Set the different URLs used to access your Marble platform, where: -# - MARBLE_API_URL is the URL your frontend process can use to reach the API (this can be a private URL). + +# MARBLE_API_URL is the URL your frontend process can use to reach the API (this can be a private URL) MARBLE_API_URL=http://localhost:8080 # # OPTIONAL SETTINGS # +# Set it to "production" if deploying instead of developing. Defaults to "production" +NODE_ENV=development + +# Set to anything other than "development" for production. Defaults to "production" +ENV=development + # Configure various external integrations. SEGMENT_WRITE_KEY= DISABLE_SEGMENT=false diff --git a/packages/app-builder/src/utils/environment.ts b/packages/app-builder/src/utils/environment.ts index 832d61816e..582be406cf 100644 --- a/packages/app-builder/src/utils/environment.ts +++ b/packages/app-builder/src/utils/environment.ts @@ -17,8 +17,8 @@ import * as z from 'zod/v4'; * List of all public env vars to defined on each deployed environments */ const PublicEnvVarsSchema = z.object({ - ENV: z.string(), - NODE_ENV: z.string(), + ENV: z.string().optional().default('production'), + NODE_ENV: z.string().optional().default('production'), APP_VERSION: z.string().optional(), SESSION_MAX_AGE: z.string().optional(),