Dockerfile
This commit is contained in:
parent
a610d38e4a
commit
92ec13192d
10
Dockerfile
10
Dockerfile
@ -1,16 +1,18 @@
|
|||||||
# C:\sukjenogi-frontend\Dockerfile
|
|
||||||
FROM node:20 AS build
|
FROM node:20 AS build
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# ✅ 모든 의존성 설치 (dev 포함)
|
# ✅ 의존성 설치
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
# ✅ TypeScript + Vite 빌드
|
# ✅ typescript 명시적 설치 (로컬에 설치되어 있어도 .bin에 안 잡히는 이슈 방지)
|
||||||
|
RUN npx tsc -v # 💡 tsc 가 설치되었는지 확인 겸 강제 캐시 등록
|
||||||
|
|
||||||
|
# ✅ 빌드 실행
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# ✅ 빌드된 정적 파일을 nginx로 제공
|
# ✅ 정적 파일 서빙
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user