Skip to content

Commit b88a57b

Browse files
committed
dockerfile nginx 설정 변경
1 parent e98c58e commit b88a57b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# 1. Node.js 환경에서 빌드
2-
FROM node:18 as build
2+
FROM node:20-alpine
33
WORKDIR /app
4-
COPY package.json ./
4+
5+
COPY package.json .
56
RUN npm install
6-
COPY . ./
7+
COPY . .
8+
79
RUN npm run build
810

9-
# 2️⃣ Production 단계 (Nginx를 사용해 정적 파일 서빙)
10-
FROM nginx:1.23-alpine
11-
COPY --from=build /app/build /usr/share/nginx/html
11+
EXPOSE 3000
1212

1313
# 🚀 컨테이너를 계속 유지하도록 추가
14-
CMD ["nginx", "-g", "daemon off;"]
14+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)