next public is inlined at build time oops
This commit is contained in:
parent
e9f0f993ce
commit
0146b9ea91
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user