File size: 878 Bytes
2ca8db5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# 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

# 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)
ENV NOTION_COOKIE=""
ENV NOTION_SPACE_ID=""

# 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"]