FROM node:lts WORKDIR /workspace # Set CI environment variable to true to avoid TTY issues with pnpm ENV CI=true # Install pnpm RUN corepack enable && corepack prepare pnpm@10.5.2 --activate # Copy workspace configs and common package COPY common ./common COPY devfront ./devfront # Install dependencies for the workspace RUN cd common && pnpm install --no-frozen-lockfile --ignore-scripts # 프로덕션 서빙을 위한 serve 패키지 글로벌 설치 RUN npm install -g serve WORKDIR /workspace/devfront # Vite 기본 포트 EXPOSE 5173 # 실행 스크립트: APP_ENV에 따라 개발 서버 또는 빌드 후 서빙 RUN chmod +x ./scripts/runtime-mode.sh CMD ["sh", "./scripts/runtime-mode.sh"]