mirror of
https://github.com/velocitatem/cvfs.git
synced 2026-05-31 08:43:37 +00:00
Fix NEXT_PUBLIC_API_BASE_URL not applying in production build
NEXT_PUBLIC_* vars are inlined at build time, not runtime. Pass as Docker build arg so Next.js picks it up during bun run build. https://claude.ai/code/session_01Xmxm2QLgFBgRJyYD6VukR6
This commit is contained in:
@@ -11,8 +11,8 @@ services:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: ./docker/webapp.Dockerfile
|
||||
environment:
|
||||
- NEXT_PUBLIC_API_BASE_URL=https://api.cv.alves.world
|
||||
args:
|
||||
- NEXT_PUBLIC_API_BASE_URL=https://api.cv.alves.world
|
||||
networks:
|
||||
- dokploy-network
|
||||
- cvfs-network
|
||||
|
||||
@@ -8,6 +8,8 @@ COPY apps/webapp/package.json apps/webapp/bun.lock ./
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
FROM deps AS builder
|
||||
ARG NEXT_PUBLIC_API_BASE_URL=http://localhost:9812
|
||||
ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL
|
||||
COPY apps/webapp ./
|
||||
RUN bun run build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user