# Use official Python image FROM python:3.9 # Set the working directory in the container WORKDIR /app # Copy project files to the container COPY . /app # Ensure the upload directory exists and set correct permissions RUN mkdir -p static/uploads && chmod -R 777 static/uploads # Install dependencies RUN pip install --no-cache-dir -r requirements.txt # Expose the app port EXPOSE 7860 # Start the app using Gunicorn CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]