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
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user