# Minimal, production-ready image FROM python:3.12-slim # Prevent Python from writing .pyc files; ensure unbuffered logs ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 WORKDIR /app # Install only what we need RUN pip install --no-cache-dir fastapi "uvicorn[standard]" # Copy the application COPY app.py /app/app.py # Expose the app port EXPOSE 8000 # Start the server CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]