File size: 524 Bytes
83e9d59 bda3c09 83e9d59 bda3c09 83e9d59 bda3c09 83e9d59 bda3c09 8e6cc5c 83e9d59 8e6cc5c 83e9d59 8e6cc5c bda3c09 8e6cc5c bda3c09 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 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"]
|