diff --git a/packages/web/Dockerfile b/packages/web/Dockerfile index 334fcd4..f036a20 100644 --- a/packages/web/Dockerfile +++ b/packages/web/Dockerfile @@ -15,6 +15,10 @@ RUN test -f .env.local || echo "# placeholder" > .env.local # Install dependencies RUN pnpm install --frozen-lockfile --ignore-scripts +# Inject NEXT_PUBLIC_API_URL at build time (Next.js bakes NEXT_PUBLIC_* into the bundle) +ARG NEXT_PUBLIC_API_URL +ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL + # Build RUN pnpm build @@ -38,4 +42,4 @@ ENV NEXT_TELEMETRY_DISABLED=1 EXPOSE 3000 -CMD ["/app/node_modules/.bin/next", "start"] \ No newline at end of file +CMD ["/app/node_modules/.bin/next", "start"]