[chore] landing: prod Dockerfile(SSG 빌드→nginx) 추가
This commit is contained in:
parent
d580e4d5ea
commit
624a8846b0
13
landing/Dockerfile.prod
Normal file
13
landing/Dockerfile.prod
Normal file
@ -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
|
||||
Loading…
Reference in New Issue
Block a user