fix: ensure environment variables are loaded before building
This commit is contained in:
@@ -23,6 +23,13 @@ ENV NODE_ENV=production
|
|||||||
# 🔍 Optional: Log key envs for debug
|
# 🔍 Optional: Log key envs for debug
|
||||||
RUN echo "📄 .env.production contents:" && cat .env.production \
|
RUN echo "📄 .env.production contents:" && cat .env.production \
|
||||||
&& echo "🔧 Current ENV available to Next.js build:" && printenv | grep -E 'SUPABASE|STRIPE|NEXT|NODE_ENV' || true
|
&& echo "🔧 Current ENV available to Next.js build:" && printenv | grep -E 'SUPABASE|STRIPE|NEXT|NODE_ENV' || true
|
||||||
|
|
||||||
|
RUN set -a \
|
||||||
|
&& . .env \
|
||||||
|
&& . .env.production \
|
||||||
|
&& set +a \
|
||||||
|
&& pnpm build
|
||||||
|
|
||||||
RUN node check-env.js
|
RUN node check-env.js
|
||||||
|
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
|||||||
Reference in New Issue
Block a user