| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app source | |
| COPY app.py . | |
| # Clean and recreate the folder with full permissions | |
| RUN rm -rf /app/batch_downloads && mkdir -p /app/batch_downloads && chmod -R 777 /app/batch_downloads | |
| # Optional: ensure script has write permissions | |
| RUN chmod -R 777 /app | |
| # Run app with full permissions | |
| EXPOSE 8000 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] |