# Base image with Python FROM python:3.9-slim # Set the working directory inside the container WORKDIR /app # Copy the application files to the container COPY . /app # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Expose the FastAPI app port EXPOSE 8000 # Ensure the application runs on Heroku's dynamic port CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port $PORT"]