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:
dahoud
2025-10-24 08:04:55 +00:00
parent ba82f5b168
commit 2cf0378270

View File

@@ -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