We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f46b04a commit 1a275cdCopy full SHA for 1a275cd
Dockerfile
@@ -6,10 +6,12 @@ RUN npm install
6
COPY . ./
7
RUN npm run build
8
9
-# 빌드된 정적 파일을 호스트 서버의 `/var/www/html`로 복사
10
-FROM alpine:latest
11
-WORKDIR /app
12
-COPY --from=build /app/dist /var/www/html
+# 2️⃣ Production 단계 (Nginx를 사용해 정적 파일 서빙)
+FROM nginx:1.23-alpine
+COPY --from=builder /app/build /usr/share/nginx/html
+
13
+# Nginx 설정 추가 (캐싱 설정 및 gzip 활성화)
14
+COPY nginx.conf /etc/nginx/conf.d/default.conf
15
16
# 🚀 컨테이너를 계속 유지하도록 추가
-CMD ["tail", "-f", "/dev/null"]
17
+CMD ["nginx", "-g", "daemon off;"]
0 commit comments