forked from OpenFrame-LIKELION/OpenFrame-FE
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 723 Bytes
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Base image for building
FROM node:18-alpine AS base
# Install dependencies
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci # package 설치
# Copy source code and set environment variables
COPY . .
# Build the Vite application
RUN npm run build # npm run build 명령어로 vite 실행
# Nginx server to serve static files
FROM nginx:stable-alpine AS runner
# Remove default Nginx configuration
RUN rm /etc/nginx/conf.d/default.conf
# Copy custom Nginx configuration
COPY nginx/nginx.conf /etc/nginx/nginx.conf
# Copy built files to Nginx for serving
COPY --from=base /app/dist /usr/share/nginx/html/page
# Expose port 3000 for Nginx
EXPOSE 3000
# Start Nginx
CMD ["nginx", "-g", "daemon off;"]