Loan_ml_project/Dockerfile
User Name 752140ab39 init
2025-06-07 23:27:56 +02:00

18 lines
431 B
Docker

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