[#28] 쿠버네티스 환경 배포 #29

Merged
pricelees merged 25 commits from infra/#28 into main 2025-08-04 05:59:38 +00:00
3 changed files with 39 additions and 0 deletions
Showing only changes of commit 0c83798b3f - Show all commits

6
frontend/.dockerignore Normal file
View File

@ -0,0 +1,6 @@
node_modules
.git
.DS_Store
npm-debug.log
dist
build

18
frontend/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
# Stage 1: Build the React app
FROM node:24 AS builder
WORKDIR /app
COPY package.json ./
COPY package-lock.json ./
RUN npm install --frozen-lockfile
COPY . .
RUN npm run build
# Stage 2: Serve with Nginx
FROM nginx:latest
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

15
frontend/nginx.conf Normal file
View File

@ -0,0 +1,15 @@
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}