FROM node:20-alpine WORKDIR /app # Copy package files first and install deps COPY package*.json ./ RUN npm install # Create an uploads folder with write permissions RUN mkdir -p /app/uploads && chmod -R 777 /app/uploads # Copy the rest of the files COPY . . EXPOSE 7860 CMD ["node", "serve.js"]