From 624a8846b04cdfe4b2f5d5c3213408a8f1cc14fa Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Fri, 24 Jul 2026 14:52:16 +0900 Subject: [PATCH] =?UTF-8?q?[chore]=20landing:=20prod=20Dockerfile(SSG=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=E2=86=92nginx)=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- landing/Dockerfile.prod | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 landing/Dockerfile.prod diff --git a/landing/Dockerfile.prod b/landing/Dockerfile.prod new file mode 100644 index 0000000..13639dd --- /dev/null +++ b/landing/Dockerfile.prod @@ -0,0 +1,13 @@ +# 프로덕션: SSG 빌드(ssr:false, prerender) → 정적 산출물(build/client)을 nginx 로 서빙. +FROM node:22-slim AS build +WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm install +COPY . . +RUN npm run build + +FROM nginx:alpine +COPY --from=build /app/build/client /usr/share/nginx/html +# 프리렌더 안 된 경로도 index.html 로 폴백(SPA). +RUN printf 'server {\n listen 80;\n root /usr/share/nginx/html;\n location / { try_files $uri $uri/ /index.html; }\n}\n' > /etc/nginx/conf.d/default.conf +EXPOSE 80