Codeai / Dockerfile
zhlajiex
Refactor: Use ImageMagick/libheif for conversion and Tesseract.js for OCR
1418755
raw
history blame contribute delete
504 Bytes
# Use Node.js 24
FROM node:24
# Install ImageMagick and libheif for image processing
RUN apt-get update && apt-get install -y \
imagemagick \
libheif-examples \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy all files
COPY . .
# Install Backend dependencies
RUN cd backend && npm install
# Build Frontend
RUN cd frontend && npm install && npm run build
# Hugging Face MUST use port 7860
EXPOSE 7860
# Start the application
CMD ["node", "backend/server.js"]