feat: implement Dockerfile

This commit is contained in:
2026-01-22 13:47:23 +07:00
parent abe72a22e1
commit accc4f9714
4 changed files with 65 additions and 0 deletions

25
Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
# Stage 1: Build
FROM node:20-alpine AS build
WORKDIR /app
# Copy package files and install dependencies
COPY package.json package-lock.json* ./
RUN npm install
# Copy source files and build the app
COPY . .
RUN npm run build
# Stage 2: Production
FROM nginx:stable-alpine
# Copy custom nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Copy build artifacts from build stage
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]