FROM node:20-alpine WORKDIR /app # Copy package files and install dependencies COPY package*.json ./ RUN npm ci --omit=dev # Copy application files COPY server.js ./ COPY public/ ./public/ COPY ai/ ./ai/ # Hugging Face Spaces runs containers as root by default, # which gives us write access to the /data persistent storage bucket CMD ["node", "server.js"] EXPOSE 7860 ENV PORT=7860 ENV NODE_ENV=production