This commit is contained in:
2026-02-03 01:45:22 +04:00
parent f53016aeda
commit b2ab5905d0
18 changed files with 18214 additions and 671 deletions

39
Dockerfile Normal file
View File

@@ -0,0 +1,39 @@
# Stage 1: Build
FROM node:22-alpine AS builder
# Install dependencies for sharp and other native modules
RUN apk add --no-cache \
python3 \
make \
g++ \
libc6-compat
# Set working directory
WORKDIR /app
# Copy package files
COPY package.json package-lock.json* ./
# Install dependencies
RUN npm ci --only=production=false
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Stage 2: Production
FROM nginx:alpine AS production
# Copy built files from builder stage
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port 80
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]