luna_ocr / Dockerfile
veela4's picture
Upload folder using huggingface_hub
bf237c2 verified
# Use Node.js 18 Alpine for smaller image size
FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
COPY server/package*.json ./server/
# Install dependencies
RUN npm install
RUN cd server && npm install
# Copy source code
COPY . .
# Build the React app
RUN npm run build
# Expose port 7860 (required by Hugging Face Spaces)
EXPOSE 7860
# Set environment variable for production
ENV NODE_ENV=production
ENV PORT=7860
# Start the server
CMD ["node", "server/server.js"]