Files
a301_client/Dockerfile
tolelom c0d827e8ec
Some checks failed
Client CI/CD / test (push) Successful in 9s
Client CI/CD / deploy (push) Failing after 2m15s
chore: 프로젝트 설정 정리 및 개선
- eslint ^10 → ^9 다운그레이드 (react-hooks 플러그인 호환)
- .npmrc 제거, Dockerfile legacy-peer-deps 플래그 제거
- Dockerfile node:lts → node:22-alpine 버전 고정, ARG 오타 수정
- .dockerignore 추가 (.env, node_modules, .git 등 제외)
- .env 삭제, .env.development 추가 (로컬 기본값 git 관리)
- vite.config.js dev proxy 추가 (/api → localhost:8080)
- index.html favicon, OG 태그, Pretendard 폰트 로드 추가
- nginx.conf /images/ 캐시 전략 추가, 주석 정리
- eslint.config.js ecmaVersion 중복 선언 정리
- deploy.yml --legacy-peer-deps, --no-cache 제거, 배포 커맨드 가독성 개선
- .github/workflows/ci.yml 삭제 (Gitea 사용으로 불필요)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 16:53:38 +09:00

19 lines
500 B
Docker

# Stage 1: Build
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
ARG VITE_API_BASE_URL
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
RUN npm run build
# Stage 2: Serve with Nginx
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost/ || exit 1
CMD ["nginx", "-g", "daemon off;"]