# Build stage FROM node:20-alpine AS build WORKDIR /app COPY package*.json ./ RUN npm ci COPY . . RUN npm run build # Production stage FROM nginx:alpine # SPA 라우팅을 위한 nginx 설정 복사 COPY nginx.conf /etc/nginx/conf.d/default.conf # 빌드된 정적 파일 복사 COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]