This commit is contained in:
Kar
2026-02-25 12:40:10 +05:30
parent a1a787ec81
commit fc1d82ad81
7 changed files with 583 additions and 0 deletions

33
Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
# Use Node.js 18 LTS
FROM node:18-alpine
# Install MongoDB CLI tools for import operations
RUN apk add --no-cache mongodb-tools
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --only=production
# Copy application code
COPY . .
# Create uploads directory for images
RUN mkdir -p uploads
# Build the application
RUN npm run build
# Expose port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:3000/api/health || exit 1
# Start the application
CMD ["npm", "start"]