Spaces:
Paused
Paused
| # Use an official Python runtime as a parent image | |
| FROM python:3.10-slim | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Copy the requirements file into the container at /app | |
| COPY requirements.txt . | |
| # Install any needed packages specified in requirements.txt | |
| # Use --no-cache-dir to reduce image size | |
| # Use --upgrade to ensure latest versions are installed | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Install Playwright browser binaries to a persistent, accessible location | |
| ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright | |
| RUN playwright install chromium --with-deps | |
| # Copy the current directory contents into the container at /app | |
| COPY main.py . | |
| COPY models.py . | |
| # Make port 8000 available to the world outside this container | |
| EXPOSE 7860 | |
| # Define environment variables (placeholders, will be set at runtime on Hugging Face) | |
| # Use NOTION_COOKIES for multiple account support. | |
| # PROXY_AUTH_TOKEN and PROXY_URL are also used by the application. | |
| ENV NOTION_COOKIES="" | |
| ENV PROXY_AUTH_TOKEN="default_token" | |
| ENV PROXY_URL="" | |
| # Run uvicorn when the container launches | |
| # Use 0.0.0.0 to make it accessible externally | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |