FROM python:3.11-slim # Install Node.js for building React app RUN apt-get update && apt-get install -y \ nodejs \ npm \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy package files and install Node dependencies COPY package*.json ./ RUN npm install # Copy all source files COPY . . # Build React app RUN npm run build # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Expose port EXPOSE 7860 # Run the application CMD ["python", "server.py"]