chore: remove unused NEXT_PUBLIC_CLIENT_ID/SECRET env vars
The OAuth flow uses grant_type=mobile with a server-issued grant (app/api/auth/token/route.js); no client_id/client_secret is sent at runtime. These vars were dead — removed from Dockerfile args/env, docker-compose, nixpacks, and docs. Also silences the Coolify 'variable not set' build warnings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,8 +17,6 @@ The dev script forces `HOST=yazd-nobat.localhost` so multi-domain detection work
|
|||||||
|
|
||||||
```env
|
```env
|
||||||
NEXT_PUBLIC_API_URL=https://api.clinic-pro.ir # Backend API base URL
|
NEXT_PUBLIC_API_URL=https://api.clinic-pro.ir # Backend API base URL
|
||||||
NEXT_PUBLIC_CLIENT_ID=... # OAuth client ID
|
|
||||||
NEXT_PUBLIC_CLIENT_SECRET=... # OAuth client secret
|
|
||||||
DEV_MODE=TRUE # TRUE → blocks all crawlers + noindex
|
DEV_MODE=TRUE # TRUE → blocks all crawlers + noindex
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -36,14 +36,10 @@ WORKDIR /app
|
|||||||
|
|
||||||
# Build-time arguments (Coolify: set these as Build Variables)
|
# Build-time arguments (Coolify: set these as Build Variables)
|
||||||
ARG NEXT_PUBLIC_API_URL
|
ARG NEXT_PUBLIC_API_URL
|
||||||
ARG NEXT_PUBLIC_CLIENT_ID
|
|
||||||
ARG NEXT_PUBLIC_CLIENT_SECRET
|
|
||||||
ARG DEV_MODE=FALSE
|
ARG DEV_MODE=FALSE
|
||||||
|
|
||||||
# Expose them to `next build`
|
# Expose them to `next build`
|
||||||
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
|
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
|
||||||
ENV NEXT_PUBLIC_CLIENT_ID=$NEXT_PUBLIC_CLIENT_ID
|
|
||||||
ENV NEXT_PUBLIC_CLIENT_SECRET=$NEXT_PUBLIC_CLIENT_SECRET
|
|
||||||
ENV DEV_MODE=$DEV_MODE
|
ENV DEV_MODE=$DEV_MODE
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|||||||
@@ -282,8 +282,6 @@ cp .env.example .env.local
|
|||||||
# 4. تنظیم متغیرهای محیطی
|
# 4. تنظیم متغیرهای محیطی
|
||||||
# ویرایش .env.local:
|
# ویرایش .env.local:
|
||||||
NEXT_PUBLIC_API_URL=http://localhost:8000
|
NEXT_PUBLIC_API_URL=http://localhost:8000
|
||||||
NEXT_PUBLIC_CLIENT_ID=your_client_id
|
|
||||||
NEXT_PUBLIC_CLIENT_SECRET=your_client_secret
|
|
||||||
DEV_MODE=TRUE
|
DEV_MODE=TRUE
|
||||||
|
|
||||||
# 5. اجرای پروژه در حالت Development
|
# 5. اجرای پروژه در حالت Development
|
||||||
@@ -696,8 +694,6 @@ export function Providers({ children }) {
|
|||||||
```env
|
```env
|
||||||
# API Configuration
|
# API Configuration
|
||||||
NEXT_PUBLIC_API_URL=https://api.nobat724.com
|
NEXT_PUBLIC_API_URL=https://api.nobat724.com
|
||||||
NEXT_PUBLIC_CLIENT_ID=your_client_id
|
|
||||||
NEXT_PUBLIC_CLIENT_SECRET=your_client_secret
|
|
||||||
|
|
||||||
# Development Mode (TRUE/FALSE)
|
# Development Mode (TRUE/FALSE)
|
||||||
DEV_MODE=FALSE
|
DEV_MODE=FALSE
|
||||||
|
|||||||
@@ -38,9 +38,6 @@ services:
|
|||||||
# API configuration
|
# API configuration
|
||||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
|
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
|
||||||
DEV_MODE: ${DEV_MODE:-FALSE}
|
DEV_MODE: ${DEV_MODE:-FALSE}
|
||||||
# Server-only OAuth credentials (not exposed to browser)
|
|
||||||
CLIENT_ID: ${CLIENT_ID:-${NEXT_PUBLIC_CLIENT_ID}}
|
|
||||||
CLIENT_SECRET: ${CLIENT_SECRET:-${NEXT_PUBLIC_CLIENT_SECRET}}
|
|
||||||
|
|
||||||
# Health check (uses Dockerfile HEALTHCHECK)
|
# Health check (uses Dockerfile HEALTHCHECK)
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|||||||
+1
-2
@@ -16,5 +16,4 @@ NEXT_TELEMETRY_DISABLED = "1"
|
|||||||
|
|
||||||
# These environment variables will need to be set in your deployment platform
|
# These environment variables will need to be set in your deployment platform
|
||||||
# NEXT_PUBLIC_API_URL - Set in deployment platform
|
# NEXT_PUBLIC_API_URL - Set in deployment platform
|
||||||
# NEXT_PUBLIC_CLIENT_ID - Set in deployment platform
|
# DEV_MODE - Set in deployment platform (FALSE in production)
|
||||||
# NEXT_PUBLIC_CLIENT_SECRET - Set in deployment platform
|
|
||||||
Reference in New Issue
Block a user