# Official Python image FROM python:3.12-slim # Set workdir WORKDIR /app # Copy the file with the requirements COPY requirements.txt . # Install the package dependencies in the requirements file. RUN pip install --no-cache-dir --upgrade -r requirements.txt # Copy the FastAPI app folder in the container COPY . . # Expose API port EXPOSE 80 # Launches the uvicorn server (command from offical FastAPI documentation) CMD ["fastapi", "run", "app/main.py", "--port", "80"]