ishaq101 Claude Sonnet 4.6 (1M context) commited on
Commit
d690895
·
1 Parent(s): 8fa19d9

fix: inject VITE_API_BASE_URL build arg in Dockerfile

Browse files

Vite bakes env vars at build time. Without passing the HuggingFace
secret as a Docker build arg, VITE_API_BASE_URL compiled to an empty
string, causing all API requests to hit the frontend's own origin.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. Dockerfile +4 -0
Dockerfile CHANGED
@@ -9,6 +9,10 @@ COPY pnpm-workspace.yaml package.json pnpm-lock.json* ./
9
  RUN pnpm install --no-frozen-lockfile
10
 
11
  COPY . .
 
 
 
 
12
  RUN pnpm build
13
 
14
  # Stage 2: Serve
 
9
  RUN pnpm install --no-frozen-lockfile
10
 
11
  COPY . .
12
+
13
+ ARG VITE_API_BASE_URL
14
+ ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
15
+
16
  RUN pnpm build
17
 
18
  # Stage 2: Serve