From e86f23688e06221cf48029aa19c28477d134d40b Mon Sep 17 00:00:00 2001 From: hamed Date: Sun, 28 Sep 2025 14:46:27 +0330 Subject: [PATCH] docs: update README for environment variable configuration and clarify usage in Next.js docker: modify Dockerfile to set NODE_ENV from environment variable for flexibility --- README.md | 12 +++++++----- dockerfile | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1312870..22496e2 100644 --- a/README.md +++ b/README.md @@ -55,14 +55,17 @@ Checks the code for linting issues. ## ⚙️ Environment Variables -Create a `.env` file in the root directory with the following variables: +Create a `.env.local` file in the root directory with the following variables: ``` -REACT_APP_API_URL=https://back-dev.clinic-pro.ir -REACT_APP_CLIENT_ID=NWuujdYHjtAtrhrk_zoWB3w0kyf56wRCOaY36MIqvbs -REACT_APP_CLIENT_SECRET=trhrk_zoWB3w0kyf +NEXT_PUBLIC_API_URL=https://back-dev.clinic-pro.ir +NEXT_PUBLIC_CLIENT_ID=NWuujdYHjtAtrhrk_zoWB3w0kyf56wRCOaY36MIqvbs +NEXT_PUBLIC_CLIENT_SECRET=trhrk_zoWB3w0kyf +NODE_ENV=development # or production ``` +**Note:** In Next.js, environment variables that need to be accessible in the browser must be prefixed with `NEXT_PUBLIC_`. Variables without this prefix are only available on the server side. + ## 🌐 Features - ✅ Responsive design using MUI and Tailwind @@ -99,4 +102,3 @@ This project is private or under your preferred license. --- > Developed with ❤️ by the Nobat724 team. - diff --git a/dockerfile b/dockerfile index 5b94891..2f9804a 100644 --- a/dockerfile +++ b/dockerfile @@ -25,7 +25,7 @@ FROM node:22-alpine AS runner WORKDIR /app # Set environment variables -ENV NODE_ENV production +ENV NODE_ENV $NODE_ENV ENV NEXT_TELEMETRY_DISABLED 1 # Add a non-root user for security