Skip to content

Commit 0761e1b

Browse files
committed
frontend Dockerfile 추가
1 parent 93af9d4 commit 0761e1b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

frontend/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 1단계: 빌드 스테이지
2+
FROM node:22-alpine AS build-stage
3+
WORKDIR /app
4+
COPY package*.json ./
5+
RUN npm install
6+
COPY . .
7+
RUN npm run build
8+
9+
# 2단계: Nginx에 빌드 결과물 복사하고 서빙
10+
FROM nginx:stable-alpine
11+
COPY --from=build-stage /app/build /usr/share/nginx/html
12+
13+
# 필요하면 nginx 설정파일 덮어쓰기 가능
14+
# COPY nginx.conf /etc/nginx/nginx.conf
15+
16+
EXPOSE 80
17+
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)