From 0146b9ea9133b55f3081b7fffb0dde49d83accb0 Mon Sep 17 00:00:00 2001 From: Joey Eamigh <55670930+JoeyEamigh@users.noreply.github.com> Date: Wed, 11 Feb 2026 23:32:02 -0500 Subject: [PATCH] next public is inlined at build time oops --- Dockerfile | 4 ++++ README.md | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c615f11..19bcaea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,10 @@ COPY . . # Prisma client + TypedSQL must be pre-generated locally (needs live DB for --sql). # src/generated/ is gitignored but included in Docker context from local dev. ENV DATABASE_URL="postgresql://placeholder:placeholder@localhost:5432/placeholder" +ARG NEXT_PUBLIC_GOOGLE_MAPS_API_KEY +ARG NEXT_PUBLIC_GOOGLE_MAP_ID +ENV NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=$NEXT_PUBLIC_GOOGLE_MAPS_API_KEY +ENV NEXT_PUBLIC_GOOGLE_MAP_ID=$NEXT_PUBLIC_GOOGLE_MAP_ID RUN npx next build FROM node:22-slim AS runner diff --git a/README.md b/README.md index 64ed1fd..3ce649d 100644 --- a/README.md +++ b/README.md @@ -151,8 +151,11 @@ The app is containerized as a standalone Next.js image for production deployment # Prisma TypedSQL must be generated locally first (requires live database) bunx prisma generate --sql -# Build the production image -docker build -t registry.claiborne.soy/busi488energy:latest . +# Build the production image (NEXT_PUBLIC_* vars are inlined at build time) +docker build \ + --build-arg NEXT_PUBLIC_GOOGLE_MAPS_API_KEY="your-key" \ + --build-arg NEXT_PUBLIC_GOOGLE_MAP_ID="your-map-id" \ + -t registry.claiborne.soy/busi488energy:latest . # Push to the internal registry docker push registry.claiborne.soy/busi488energy:latest