diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8770e18 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# Stage 1: Build the application +FROM node:20-alpine AS builder +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build + +# Stage 2: Serve the static files with Nginx +FROM nginx:alpine +# Copy the build files from the builder stage to the Nginx web directory +COPY --from=builder /app/dist /usr/share/nginx/html +# Expose port 80 where the Nginx server runs +EXPOSE 80 +# Command to start Nginx server +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file