File size: 437 Bytes
c234b78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
03949fb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Use an official Python runtime as a parent image
FROM python:3.9-slim

# Set the working directory in the container
WORKDIR /app

# Copy requirements.txt and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the FastAPI application
COPY main.py .

# Expose port 80 for HTTP
EXPOSE 80

# Run the FastAPI application with Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "3000"]