FROM node:20 WORKDIR /app # Copy package files first for caching COPY package*.json ./ RUN npm install --ignore-scripts # Copy source files COPY . . # Run prep build scripts RUN npm run build:css # Set Hugging Face environment defaults ENV PORT=7860 ENV NODE_ENV=production EXPOSE 7860 COPY start.sh /app/start.sh RUN chmod +x /app/start.sh CMD ["/app/start.sh"]