next public is inlined at build time oops

This commit is contained in:
Joey Eamigh 2026-02-11 23:32:02 -05:00
parent e9f0f993ce
commit 0146b9ea91
No known key found for this signature in database
GPG Key ID: CE8C05DFFC53C9CB
2 changed files with 9 additions and 2 deletions

View File

@ -10,6 +10,10 @@ COPY . .
# Prisma client + TypedSQL must be pre-generated locally (needs live DB for --sql). # 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. # src/generated/ is gitignored but included in Docker context from local dev.
ENV DATABASE_URL="postgresql://placeholder:placeholder@localhost:5432/placeholder" 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 RUN npx next build
FROM node:22-slim AS runner FROM node:22-slim AS runner

View File

@ -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) # Prisma TypedSQL must be generated locally first (requires live database)
bunx prisma generate --sql bunx prisma generate --sql
# Build the production image # Build the production image (NEXT_PUBLIC_* vars are inlined at build time)
docker build -t registry.claiborne.soy/busi488energy:latest . 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 # Push to the internal registry
docker push registry.claiborne.soy/busi488energy:latest docker push registry.claiborne.soy/busi488energy:latest