ci: 빌드 시 VITE_API_BASE_URL을 build arg로 주입
All checks were successful
Client CI/CD / deploy (push) Successful in 12s

Vite는 빌드 타임에 환경변수를 번들에 포함하므로
서버 secrets에서 VITE_API_BASE_URL을 받아 docker build 시 전달

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 14:35:09 +09:00
parent 86c6720f30
commit 2f56dfb519
2 changed files with 4 additions and 2 deletions

View File

@@ -4,6 +4,8 @@ WORKDIR /app
COPY package*.json ./
RUN npm ci --legacy-peer-deps
COPY . .
ARG VITE_API_BASE_URL
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
RUN npm run build
# Stage 2: Serve with Nginx
@@ -11,4 +13,4 @@ FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]