Fix: Add NODE_ENV=production during Next.js build to load .env.production
Next.js only loads .env.production when NODE_ENV=production is set during build time. Previously, NODE_ENV was only set in the runner stage, causing the builder stage to ignore .env.production and use default values. This fixes NEXT_PUBLIC_API_URL to correctly point to https://api.lions.dev/btpxpress instead of just https://api.lions.dev.
This commit is contained in:
@@ -20,6 +20,7 @@ RUN npm ci
|
||||
COPY . .
|
||||
|
||||
# Build Next.js application
|
||||
ENV NODE_ENV production
|
||||
ENV NEXT_TELEMETRY_DISABLED 1
|
||||
RUN npm run build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user